diff options
author | Spencer Lyon <spencerlyon2@gmail.com> | 2014-10-01 11:20:06 -0400 |
---|---|---|
committer | Spencer Lyon <spencerlyon2@gmail.com> | 2014-10-01 11:20:06 -0400 |
commit | 84374c54bf76074eec37c4be8e2db4515860d59a (patch) | |
tree | dadedc812d77c07bd2428d369d5dcf81991de675 | |
parent | 1d5318fb4b53f57660427e228db5061c4a656c13 (diff) | |
download | pygments-84374c54bf76074eec37c4be8e2db4515860d59a.tar.gz |
Added mulitiline comments to julia lexer
-rw-r--r-- | pygments/lexers/julia.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/pygments/lexers/julia.py b/pygments/lexers/julia.py index 7365d7ab..395bf865 100644 --- a/pygments/lexers/julia.py +++ b/pygments/lexers/julia.py @@ -42,6 +42,7 @@ class JuliaLexer(RegexLexer): 'root': [ (r'\n', Text), (r'[^\S\n]+', Text), + (r'#=\s*\n', Comment.Multiline, "blockcomment"), (r'#.*$', Comment), (r'[]{}:(),;[@]', Punctuation), (r'\\\n', Text), @@ -119,7 +120,12 @@ class JuliaLexer(RegexLexer): (r'\\([\\abfnrtv"\']|\n|N{.*?}|u[a-fA-F0-9]{4}|' r'U[a-fA-F0-9]{8}|x[a-fA-F0-9]{2}|[0-7]{1,3})', String.Escape) ], - + "blockcomment": [ + (r'[^=#]', Comment.Multiline), + (r'#=', Comment.Multiline, '#push'), + (r'=#', Comment.Multiline, '#pop'), + (r'[=#]', Comment.Multiline), + ], 'string': [ (r'"', String, '#pop'), (r'\\\\|\\"|\\\n', String.Escape), # included here for raw strings |