Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b5fc0ab

Browse files
committed
Allow optional arguments to LaTeX macros to span lines. This is legal in
LaTeX and we have at least one occurance of that in the content, so this script needs to support it as well.
1 parent e06cbb8 commit b5fc0ab

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Doc/tools/sgmlconv/latex2esis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def __init__(self, found, stack):
5656
_begin_macro_rx = re.compile(r"[\\]([a-zA-Z]+[*]?) ?({|\s*\n?)")
5757
_comment_rx = re.compile("%+ ?(.*)\n[ \t]*")
5858
_text_rx = re.compile(r"[^]~%\\{}]+")
59-
_optional_rx = re.compile(r"\s*[[]([^]]*)[]]")
59+
_optional_rx = re.compile(r"\s*[[]([^]]*)[]]", re.MULTILINE)
6060
# _parameter_rx is this complicated to allow {...} inside a parameter;
6161
# this is useful to match tabular layout specifications like {c|p{24pt}}
6262
_parameter_rx = re.compile("[ \n]*{(([^{}}]|{[^}]*})*)}")

0 commit comments

Comments
 (0)