Comments.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36100 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2010-11-05 01:24:38 +00:00
parent 6628aec30c
commit 859468234f

View File

@ -246,9 +246,12 @@ def find_end_of_layout(lines, i):
return find_end_of(lines, i, "\\begin_layout", "\\end_layout")
# checks if line i is in the inset e.g., "\\begin_inset CommandInset ref"
# checks if line i is in the given inset
# if so, returns starting and ending lines
# otherwise, returns (-1, -1)
# Example:
# get_containing_inset(document.body, i, "\\begin_inset Tabular")
# returns (-1, -1) unless i is within a table.
def get_containing_inset(lines, i, inset):
defval = (-1, -1)
stins = find_token_backwards(lines, inset, i)