Add processing of fields in the Tokenizer

This commit is contained in:
Veronica Berglyd Olsen
2024-10-28 16:50:30 +01:00
parent 857b6ddc55
commit 041183f914
6 changed files with 40 additions and 9 deletions
+1
View File
@@ -89,6 +89,7 @@ class nwShortcode:
BREAK = "[br]"
FOOTNOTE_B = "[footnote:"
FIELD_B = "[field:"
COMMENT_STYLES = {
nwComment.FOOTNOTE: "[footnote:{0}]",
+2 -1
View File
@@ -92,7 +92,8 @@ class TextFmt(IntEnum):
HRF_B = 21 # Begin href link
HRF_E = 22 # End href link
FNOTE = 23 # Footnote marker
STRIP = 24 # Strip the format code
FIELD = 24 # Data field
STRIP = 25 # Strip the format code
class BlockTyp(IntEnum):
+1
View File
@@ -193,6 +193,7 @@ class Tokenizer(ABC):
}
self._shortCodeVals = {
nwShortcode.FOOTNOTE_B: TextFmt.FNOTE,
nwShortcode.FIELD_B: TextFmt.FIELD,
}
# Dialogue