diff options
author | Matth?us G. Chajdas <dev@anteru.net> | 2018-11-27 22:03:28 +0100 |
---|---|---|
committer | Matth?us G. Chajdas <dev@anteru.net> | 2018-11-27 22:03:28 +0100 |
commit | 46c8092c1804b2d19d275024614a22e22f963aef (patch) | |
tree | 7ed1dea5b1a99995b13c3aad46da15bd1f038168 /pygments/lexers/csound.py | |
parent | 50970bf9589373fa159276e6b03e7a75c0c4f7fe (diff) | |
download | pygments-46c8092c1804b2d19d275024614a22e22f963aef.tar.gz |
Fix Csound name callback cutting off part of the name.
Previously, a name like P:C would get parsed as P, breaking the roundtrip. This
would result in random test failures during roundtrip testing.
Diffstat (limited to 'pygments/lexers/csound.py')
-rw-r--r-- | pygments/lexers/csound.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pygments/lexers/csound.py b/pygments/lexers/csound.py index b86de091..c30b87cc 100644 --- a/pygments/lexers/csound.py +++ b/pygments/lexers/csound.py @@ -227,6 +227,9 @@ class CsoundOrchestraLexer(CsoundLexer): yield nameMatch.start(2), Name, nameMatch.group(2) else: yield match.start(), Name, name + if match.group(2): + yield match.start(2), Punctuation, match.group(2) + yield match.start(3), Name, match.group(3) tokens = { 'root': [ |