1
0
mirror of https://github.com/alecthomas/chroma.git synced 2025-03-17 20:58:08 +02:00

Fix YAML pipe symbol (issue #194)

This commit is contained in:
Jos512 2018-11-12 07:27:51 +01:00 committed by Alec Thomas
parent 022b6f4fc2
commit 813e33c8f4

View File

@ -20,7 +20,7 @@ var YAML = internal.Register(MustNewLexer(
{`&[^\s]+`, CommentPreproc, nil},
{`\*[^\s]+`, CommentPreproc, nil},
{`^%include\s+[^\n\r]+`, CommentPreproc, nil},
{`([>|])(\s+)((?:(?:.*?$)(?:[\n\r]*?\2)?)*)`, ByGroups(StringDoc, StringDoc, StringDoc), nil},
{`([>|+-]\s+)(\s+)((?:(?:.*?$)(?:[\n\r]*?)?)*)`, ByGroups(StringDoc, StringDoc, StringDoc), nil},
Include("value"),
{`[?:,\[\]]`, Punctuation, nil},
{`.`, Text, nil},