Skip to content
Snippets Groups Projects
Commit 075968d1 authored by Administrator's avatar Administrator
Browse files

Match ; as content

parent 038648f4
No related branches found
No related tags found
No related merge requests found
......@@ -158,7 +158,9 @@ class Content(Element):
# v3: does not allow braces in the content
#PATTERN = r"\s*(?<content>(?:[^\[\];\r\n{}]+)?(?:\[[^\]\r\n{}]+\][^;\[\]\r\n{}]*)*);?"
# v4: do not allow empty match (require either the first or the second part to be non-empty)
PATTERN = r"\s*(?<content>(?:(?:[^\[\];\r\n{}]+)|(?:[^\[\];\r\n{}]+)?(?:\[[^\]\r\n{}]+\][^;\[\]\r\n{}]*)+));?"
#PATTERN = r"\s*(?<content>(?:(?:[^\[\];\r\n{}]+)|(?:[^\[\];\r\n{}]+)?(?:\[[^\]\r\n{}]+\][^;\[\]\r\n{}]*)+));?"
# v5: do match emptystring if followed by a semi colon
PATTERN = r"\s*(?<content>(?:[^\[\];\r\n{}]+);?|(?:[^\[\];\r\n{}]+)?(?:\[[^\]\r\n{}]+\][^;\[\]\r\n{}]*)+;?|;)"
class Text:
def __init__(self, text, linenumber, fork):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment