summaryrefslogtreecommitdiff
path: root/lib/coderay/scanners
diff options
context:
space:
mode:
authorKornelius Kalnbach <murphy@rubychan.de>2011-10-13 12:48:20 +0200
committerKornelius Kalnbach <murphy@rubychan.de>2011-10-13 12:48:20 +0200
commit316f071a1163c96beeab191a9700f863cfc74405 (patch)
treee744914ea7c9ed3a60746bfc0fffb5d3b74d42aa /lib/coderay/scanners
parentec60c83ce34b0b796e274934ebaf5bd19f1a8867 (diff)
downloadcoderay-316f071a1163c96beeab191a9700f863cfc74405.tar.gz
allow - and / in YAML keys
Diffstat (limited to 'lib/coderay/scanners')
-rw-r--r--lib/coderay/scanners/yaml.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/coderay/scanners/yaml.rb b/lib/coderay/scanners/yaml.rb
index 5e74f2f..96f4e93 100644
--- a/lib/coderay/scanners/yaml.rb
+++ b/lib/coderay/scanners/yaml.rb
@@ -76,7 +76,7 @@ module Scanners
when match = scan(/[,{}\[\]]/)
encoder.text_token match, :operator
next
- when state == :initial && match = scan(/[\w.() ]*\S(?= *:(?: |$))/)
+ when state == :initial && match = scan(/[-\w.()\/ ]*\S(?= *:(?: |$))/)
encoder.text_token match, :key
key_indent = column(pos - match.size) - 1
state = :colon