diff --git a/lib/rouge/lexers/json_doc.rb b/lib/rouge/lexers/json_doc.rb index e545a6d8b9..d27bd7bac8 100644 --- a/lib/rouge/lexers/json_doc.rb +++ b/lib/rouge/lexers/json_doc.rb @@ -6,16 +6,17 @@ module Lexers load_lexer 'json.rb' class JSONDOC < JSON - desc "JavaScript Object Notation with extenstions for documentation" + desc "JavaScript Object Notation with extensions for documentation" tag 'json-doc' - prepend :root do + prepend :name do rule %r/([$\w]+)(\s*)(:)/ do groups Name::Attribute, Text, Punctuation end + end + prepend :value do rule %r(/[*].*?[*]/), Comment - rule %r(//.*?$), Comment::Single rule %r/(\.\.\.)/, Comment::Single end