From: Fred Drake Date: Mon, 23 Nov 1998 18:21:54 +0000 (+0000) Subject: Fix comment regex so we don't screw up structured comments with X-Git-Tag: v1.5.2b1~201 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5701482ea797604a3f0f1c310738e24605d9107f;p=python Fix comment regex so we don't screw up structured comments with different internal indentation levels. --- diff --git a/Doc/tools/sgmlconv/latex2esis.py b/Doc/tools/sgmlconv/latex2esis.py index afa2d86584..cf50050476 100755 --- a/Doc/tools/sgmlconv/latex2esis.py +++ b/Doc/tools/sgmlconv/latex2esis.py @@ -24,7 +24,7 @@ class LaTeXFormatError(Error): _begin_env_rx = re.compile(r"[\\]begin{([^}]*)}") _end_env_rx = re.compile(r"[\\]end{([^}]*)}") _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"[^]%\\{}]+") _optional_rx = re.compile(r"\s*[[]([^]]*)[]]") _parameter_rx = re.compile("[ \n]*{([^}]*)}")