fix: Fixed bug that tag detects <u>

This commit is contained in:
Prof. Dr. Matthias Jung DL9MJ
2024-12-08 10:13:26 +01:00
parent cdd61d463f
commit 746f18e735
2 changed files with 14 additions and 2 deletions
+13 -1
View File
@@ -2,12 +2,24 @@ import re
from mistletoe.block_token import BlockToken, tokenize
captures = [
"margin",
"indepth",
"webmargin",
"tipp",
"webtipp",
"webindepth",
"unit",
"danger",
"webonly",
"latexonly",
]
class Tag(BlockToken):
@staticmethod
def start(line):
return re.match(r"^\s*<[^>]+>", line)
return re.match(r"^\s*<("+"|".join(captures)+r")+>", line)
@classmethod
def read(cls, lines):