diff --git a/mode/rst.py b/mode/rst.py index 30e665c..7f10991 100644 --- a/mode/rst.py +++ b/mode/rst.py @@ -12,8 +12,8 @@ class RSTGrammar(Grammar): rules = [ PatternRule(r'escape', r'\\.'), - PatternRule(r'bullet', r'^ *[-*+]'), - PatternRule(r'enumeration', r'^ *(?:[0-9]+|#)\.'), + PatternRule(r'bullet', r'^ *[-*+](?=$| )'), + PatternRule(r'enumeration', r'^ *(?:[0-9]+|#)\.(?=$| )'), RegionRule(r'strong_emphasis', r'\*\*', RSTString, r'\*\*'), RegionRule(r'emphasis', r'\*', RSTString, r'\*'),