if not line:
return (None, "")
- bracere = re.compile("(\s*)(.*)")
+ bracere = re.compile(r"(\s*)(.*)")
n = bracere.match(line)
whitespace = n.group(1)
stuff = n.group(2)
data = data.replace('\\\\', '\\')
# Math:
- mathre = re.compile('^(.*?)(\$.*?\$)(.*)')
+ mathre = re.compile(r'^(.*?)(\$.*?\$)(.*)')
lines = data.split('\n')
for line in lines:
#document.warning("LINE: " + line)
def convert_inset_command(document):
- """
+ r"""
Convert:
\begin_inset LatexCommand cmd
to
def revert_inset_command(document):
- """
+ r"""
Convert:
\begin_inset CommandInset InsetType
LatexCommand cmd
def convert_macro_global(document):
- "Remove TeX code command \global when it is in front of a macro"
+ r"Remove TeX code command \global when it is in front of a macro"
# math macros are nowadays already defined \global, so that an additional
# \global would make the document uncompilable, see
# http://www.lyx.org/trac/ticket/5371
def remove_extra_embedded_files(document):
- " Remove \extra_embedded_files from buffer params "
+ r" Remove \extra_embedded_files from buffer params "
i = find_token(document.header, '\\extra_embedded_files', 0)
if i == -1:
return