From 316f071a1163c96beeab191a9700f863cfc74405 Mon Sep 17 00:00:00 2001 From: Kornelius Kalnbach Date: Thu, 13 Oct 2011 12:48:20 +0200 Subject: allow - and / in YAML keys --- lib/coderay/scanners/yaml.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/coderay') 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 -- cgit v1.2.1