Skip to content

Commit

Permalink
Fix: do not allow an underscore in a tag name
Browse files Browse the repository at this point in the history
This minor fix it can be very distruptive but keeping allowing the
undercore breaks the internals and the result may be undefined (bogus).
  • Loading branch information
eldipa committed Nov 13, 2018
1 parent 4b70016 commit 38766d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion byexample/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def capture_tag_regex(self):
*cannot* be used as a valid character in the name.
Instead you should use minus '-'.
'''
return re.compile(r"<(?P<name>(?:\w|-|\.)+)>")
return re.compile(r"<(?P<name>(?:[^\W_]|-|\.)+)>")

@constant
def leading_optional_whitespace_regex(self):
Expand Down

0 comments on commit 38766d8

Please sign in to comment.