Skip to content

Commit

Permalink
Fixed regex for round brackets
Browse files Browse the repository at this point in the history
Used a different expression to match round brackets and anything in between.
This change fixes the option "Ignore everything contained in () Brackets" which previously did not work.
Credit: @BenGB98
  • Loading branch information
landonepps committed Jul 17, 2020
1 parent 7e84eb5 commit d655538
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion morph/morphemes.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def find_class(self, cmodule, cname):
return pickle.Unpickler.find_class(self, cmodule, cname)

square_brackets_regex = re.compile(r'\[[^\]]*\]')
round_brackets_regex = re.compile(r'([^)]+)')
round_brackets_regex = re.compile(r'\([^)]*\)')

def getMorphemes(morphemizer, expression, note_tags=None):
if cfg('Option_IgnoreBracketContents'):
Expand Down

0 comments on commit d655538

Please sign in to comment.