Distinguish between anchor ref and href in tokenizer

This commit is contained in:
Veronica Berglyd Olsen
2024-10-25 19:08:06 +02:00
parent 058758122c
commit d71435df53
7 changed files with 37 additions and 31 deletions
+2 -2
View File
@@ -1089,8 +1089,8 @@ class Tokenizer(ABC):
for n, bit in enumerate(bits[1:], 2):
end = pos + len(bit)
fmt.append((pos, TextFmt.COL_B, "tag"))
fmt.append((pos, TextFmt.HRF_B, f"#tag_{bit}".lower()))
fmt.append((end, TextFmt.HRF_E, ""))
fmt.append((pos, TextFmt.ARF_B, f"#tag_{bit}".lower()))
fmt.append((end, TextFmt.ARF_E, ""))
fmt.append((end, TextFmt.COL_E, ""))
txt.append(bit)
pos = end