feature: implement index on html side as stub

This commit is contained in:
Matthias Jung
2026-04-01 23:30:43 +02:00
parent 11b41f2de6
commit 1e361787f0
3 changed files with 41 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
import re
from mistletoe.span_token import SpanToken
class Index(SpanToken):
"""
Resolve index commands
Identifies "[index:term:subterm]" or "[index:term]"
"""
pattern = re.compile(r"[ \t]*\[index:([^:\]\s]+)(?::([^:\]\s]+))?\]")
def __init__(self, match_object):
self.first = match_object.group(1)
self.second = match_object.group(2)