Add shortcodes functionality

This commit is contained in:
Veronica Berglyd Olsen
2023-10-20 17:50:18 +02:00
parent 2214b7472b
commit 1558a11646
4 changed files with 72 additions and 77 deletions
+2 -2
View File
@@ -162,8 +162,8 @@ class ToMarkdown(Tokenizer):
elif tType == self.T_TEXT:
tTemp = tText
for xPos, xLen, xFmt in reversed(tFormat):
tTemp = tTemp[:xPos] + mdTags[xFmt] + tTemp[xPos+xLen:]
for pos, fmt in reversed(tFormat):
tTemp = f"{tTemp[:pos]}{mdTags[fmt]}{tTemp[pos:]}"
para.append(tTemp.rstrip())
elif tType == self.T_SYNOPSIS and self._doSynopsis: