Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
protokollsystem
proto3
Commits
47ede2e6
Commit
47ede2e6
authored
Mar 03, 2017
by
Administrator
Browse files
Do not match an emptystring to content, which resulted in a infinite loop
parent
f825a887
Changes
1
Hide whitespace changes
Inline
Side-by-side
parser.py
View file @
47ede2e6
...
...
@@ -156,7 +156,9 @@ class Content(Element):
# v2: does not require the semicolon, but the newline
#PATTERN = r"\s*(?<content>(?:[^\[\];\r\n]+)?(?:\[[^\]\r\n]+\][^;\[\]\r\n]*)*);?"
# v3: does not allow braces in the content
PATTERN
=
r
"\s*(?<content>(?:[^\[\];\r\n{}]+)?(?:\[[^\]\r\n{}]+\][^;\[\]\r\n{}]*)*);?"
#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{}]*)+));?"
class
Text
:
def
__init__
(
self
,
text
,
linenumber
,
fork
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment