Commit 66285014 authored by Fred Drake's avatar Fred Drake

Fix comment regex so we don't screw up structured comments with

different internal indentation levels.
parent abf3044e
...@@ -24,7 +24,7 @@ class LaTeXFormatError(Error): ...@@ -24,7 +24,7 @@ class LaTeXFormatError(Error):
_begin_env_rx = re.compile(r"[\\]begin{([^}]*)}") _begin_env_rx = re.compile(r"[\\]begin{([^}]*)}")
_end_env_rx = re.compile(r"[\\]end{([^}]*)}") _end_env_rx = re.compile(r"[\\]end{([^}]*)}")
_begin_macro_rx = re.compile("[\\\\]([a-zA-Z]+[*]?)({|\\s*\n?)") _begin_macro_rx = re.compile("[\\\\]([a-zA-Z]+[*]?)({|\\s*\n?)")
_comment_rx = re.compile("%+[ \t]*(.*)\n") _comment_rx = re.compile("%+ ?(.*)\n")
_text_rx = re.compile(r"[^]%\\{}]+") _text_rx = re.compile(r"[^]%\\{}]+")
_optional_rx = re.compile(r"\s*[[]([^]]*)[]]") _optional_rx = re.compile(r"\s*[[]([^]]*)[]]")
_parameter_rx = re.compile("[ \n]*{([^}]*)}") _parameter_rx = re.compile("[ \n]*{([^}]*)}")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment