./lib/coderay/scanners/yaml.rb in coderay-1.0.0.598.pre vs ./lib/coderay/scanners/yaml.rb in coderay-1.0.0.738.pre

- old
+ new

@@ -58,12 +58,14 @@ string_indent = key_indent || column(pos - match.size - 1) encoder.text_token matched, :content if scan(/(?:\n+ {#{string_indent + 1}}.*)+/) encoder.end_group :string next when match = scan(/(?![!"*&]).+?(?=$|\s+#)/) - encoder.text_token match, :string + encoder.begin_group :string + encoder.text_token match, :content string_indent = key_indent || column(pos - match.size - 1) - encoder.text_token matched, :string if scan(/(?:\n+ {#{string_indent + 1}}.*)+/) + encoder.text_token matched, :content if scan(/(?:\n+ {#{string_indent + 1}}.*)+/) + encoder.end_group :string next end elsif case when match = scan(/[-:](?= |$)/)