Skip to content

Commit

Permalink
Add jsonc alias to JSONDOC lexer (#1440)
Browse files Browse the repository at this point in the history
GitHub supports the use of the `jsonc` info string to permit comments
in JSON. The Rouge JSONDOC lexer provides a lexer that would lex this
correctly but which does not support the use of `jsonc` as an alias.
This commit adds that alias.
  • Loading branch information
pyrmont committed Apr 3, 2020
1 parent aa2b153 commit 9675b04
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/rouge/lexers/json_doc.rb
Expand Up @@ -8,6 +8,7 @@ module Lexers
class JSONDOC < JSON
desc "JavaScript Object Notation with extensions for documentation"
tag 'json-doc'
aliases 'jsonc'

prepend :name do
rule %r/([$\w]+)(\s*)(:)/ do
Expand Down

0 comments on commit 9675b04

Please sign in to comment.