Skip to content

Commit 316f071

Browse files
committed
allow - and / in YAML keys
1 parent ec60c83 commit 316f071

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/coderay/scanners/yaml.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def scan_tokens encoder, options
7676
when match = scan(/[,{}\[\]]/)
7777
encoder.text_token match, :operator
7878
next
79-
when state == :initial && match = scan(/[\w.() ]*\S(?= *:(?: |$))/)
79+
when state == :initial && match = scan(/[-\w.()\/ ]*\S(?= *:(?: |$))/)
8080
encoder.text_token match, :key
8181
key_indent = column(pos - match.size) - 1
8282
state = :colon

0 commit comments

Comments
 (0)