2
0
Fork 0
mirror of https://github.com/MartinThoma/LaTeX-examples.git synced 2025-04-26 06:48:04 +02:00

Bug fixing; Made base more explicit

This commit is contained in:
Martin Thoma 2014-02-11 17:51:14 +01:00
parent 7cf94a1f8a
commit 5b174e9a14
6 changed files with 40 additions and 11 deletions

View file

@ -7,7 +7,7 @@ def get_definitions(filename):
with open(filename) as f:
content = f.read()
pattern = re.compile(r"^\\begin{definition}(.*?)\\end{definition}", re.DOTALL | re.UNICODE)
pattern = re.compile(r"^\\begin{definition}(.*?)\\end{definition}", re.DOTALL | re.UNICODE | re.MULTILINE)
index_pattern = re.compile(r"\\xindex{(?:.*?@)?(.*?)(?:\|.*?)?}", re.UNICODE)
todo_pattern = re.compile(r"\\todo{.*?}", re.UNICODE)
definitions = re.findall(pattern, content)