From 859468234fe3ec1a19b4ffd7a06effca92dc4211 Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Fri, 5 Nov 2010 01:24:38 +0000 Subject: [PATCH] Comments. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36100 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/lyx2lyx/parser_tools.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/lyx2lyx/parser_tools.py b/lib/lyx2lyx/parser_tools.py index 5a88da2385..7f783b9d21 100644 --- a/lib/lyx2lyx/parser_tools.py +++ b/lib/lyx2lyx/parser_tools.py @@ -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)