diff options
author | Oldes <oldes.huhuman@gmail.com> | 2014-05-05 11:27:44 +0200 |
---|---|---|
committer | Oldes <oldes.huhuman@gmail.com> | 2014-05-05 11:27:44 +0200 |
commit | 486a5b0eee1d5df81f4eb9adff998f191d48e7c9 (patch) | |
tree | 0b4a3a55ed481bdb0d8ecedfa5c4e72f46806bcd /pygments/lexers/other.py | |
parent | 7f5d28f8df91a0529dadfa92ab377a90c1166ca5 (diff) | |
download | pygments-486a5b0eee1d5df81f4eb9adff998f191d48e7c9.tar.gz |
FIX: Issue #985 - REBOL comments
Diffstat (limited to 'pygments/lexers/other.py')
-rw-r--r-- | pygments/lexers/other.py | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/pygments/lexers/other.py b/pygments/lexers/other.py index 0bbf5b32..89c2447e 100644 --- a/pygments/lexers/other.py +++ b/pygments/lexers/other.py @@ -1506,7 +1506,10 @@ class RebolLexer(RegexLexer): (r'[a-zA-Z]+[^(\^{"\s:)]*://[^(\^{"\s)]*', Name.Decorator), # url (r'mailto:[^(\^{"@\s)]+@[^(\^{"@\s)]+', Name.Decorator), # url (r'[^(\^{"@\s)]+@[^(\^{"@\s)]+', Name.Decorator), # email - (r'comment\s', Comment, 'comment'), + (r'comment\s"', Comment, 'commentString1'), + (r'comment\s{', Comment, 'commentString2'), + (r'comment\s\[', Comment, 'commentBlock'), + (r'comment\s[^(\s{\"\[]+', Comment), (r'/[^(\^{^")\s/[\]]*', Name.Attribute), (r'([^(\^{^")\s/[\]]+)(?=[:({"\s/\[\]])', word_callback), (r'<[a-zA-Z0-9:._-]*>', Name.Tag), @@ -1561,12 +1564,6 @@ class RebolLexer(RegexLexer): (r'([0-1]\s*){8}', Number.Hex), (r'}', Number.Hex, '#pop'), ], - 'comment': [ - (r'"', Comment, 'commentString1'), - (r'{', Comment, 'commentString2'), - (r'\[', Comment, 'commentBlock'), - (r'[^(\s{\"\[]+', Comment, '#pop'), - ], 'commentString1': [ (r'[^(\^")]+', Comment), (escape_re, Comment), @@ -1585,7 +1582,9 @@ class RebolLexer(RegexLexer): 'commentBlock': [ (r'\[', Comment, '#push'), (r'\]', Comment, '#pop'), - (r'[^(\[\])]+', Comment), + (r'"', Comment, "commentString1"), + (r'{', Comment, "commentString2"), + (r'[^(\[\]\"{)]+', Comment), ], } def analyse_text(text): |