refactor: adopts rendering process to new data source

This commit is contained in:
Matthias Jung
2026-02-01 20:31:46 +01:00
parent d5399e30f9
commit 2139685192
5 changed files with 44 additions and 30 deletions
+2 -2
View File
@@ -8,12 +8,12 @@ class Question(BlockToken):
def start(line):
# Search for:
# [question:123]
return re.match(r"^\s*\[question:\d+\]", line)
return re.match(r"^\s*\[question:[\w\d]+\]", line)
@classmethod
def read(cls, lines):
first_line = next(lines)
question_number = re.match(r"^\s*\[question:(\d+)\]", first_line).group(1)
question_number = re.match(r"^\s*\[question:([\w\d]+)\]", first_line).group(1)
return question_number
@classmethod