Skip to content

Commit

Permalink
Merge pull request #871 from benoit-pierre/fix_suggestions
Browse files Browse the repository at this point in the history
Fix suggestions
  • Loading branch information
morinted committed Dec 4, 2017
2 parents 98c459c + f7747ff commit 1c89a32
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions plover/formatting.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ def iter_last_words(self, strip=False, rx=WORD_RX):
passed as <rx>, then it must include trailing whitespace as
part of each word.
"""
assert not rx.groups
for fragment in self.iter_last_fragments():
# Split each fragment into words.
for word in reversed(rx.findall(fragment)):
Expand Down
2 changes: 1 addition & 1 deletion plover/gui_qt/suggestions_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class SuggestionsDialog(Tool, Ui_SuggestionsDialog):
ROLE = 'suggestions'
SHORTCUT = 'Ctrl+J'

WORD_RX = re.compile(r'((\w+|[^\w\s]+)\s*)')
WORD_RX = re.compile(r'(?:\w+|[^\w\s]+)\s*')

STYLE_TRANSLATION, STYLE_STROKES = range(2)

Expand Down

0 comments on commit 1c89a32

Please sign in to comment.