Escape curly braces to avoid substitution error during formatting
This commit is contained in:
parent
8d0b0c7c79
commit
8abcf059b0
|
@ -76,6 +76,9 @@ class LexiconArticle:
|
||||||
# Escape angle brackets
|
# Escape angle brackets
|
||||||
para = re.sub("<", "<", para)
|
para = re.sub("<", "<", para)
|
||||||
para = re.sub(">", ">", para)
|
para = re.sub(">", ">", para)
|
||||||
|
# Escape curly braces
|
||||||
|
para = re.sub("{", "{", para)
|
||||||
|
para = re.sub("}", "}", para)
|
||||||
# Replace bold and italic marks with tags
|
# Replace bold and italic marks with tags
|
||||||
para = re.sub(r"//([^/]+)//", r"<i>\1</i>", para)
|
para = re.sub(r"//([^/]+)//", r"<i>\1</i>", para)
|
||||||
para = re.sub(r"\*\*([^*]+)\*\*", r"<b>\1</b>", para)
|
para = re.sub(r"\*\*([^*]+)\*\*", r"<b>\1</b>", para)
|
||||||
|
|
Loading…
Reference in New Issue