Merge branch 'main' into feature/latex

This commit is contained in:
Tim Grelka
2024-12-11 00:53:09 +01:00
18 changed files with 352 additions and 39 deletions
+4 -4
View File
@@ -18,11 +18,11 @@ captures = [
"latexonly",
]
class Tag(BlockToken):
class Tag(BlockToken):
@staticmethod
def start(line):
return re.match(r"^\s*<("+"|".join(captures)+r")+>", line)
return re.match(r"^\s*<(" + "|".join(captures) + r")+>", line)
@classmethod
def read(cls, lines):
@@ -34,9 +34,9 @@ class Tag(BlockToken):
for line in lines:
if line.startswith(f"</{tagtype}>"):
break
else :
else:
child_lines.append(line)
return tagtype, tokenize(child_lines)
def __init__(self, match):
self.tagtype, self.children = match
self.tagtype, self.children = match