Skip to content

Commit

Permalink
GraphQL: Support for markdown descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
dblessing committed Oct 8, 2018
1 parent 9a445da commit d59a7a2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/rouge/lexers/graphql.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ class GraphQL < RegexLexer
rule /\bunion\b/, Keyword, :union_definition

mixin :basic

# Markdown descriptions
rule /(""")(.*?)(""")/m do |m|
token Str::Double, m[1]
delegate Markdown, m[2]
token Str::Double, m[3]
end
end

state :basic do
Expand Down

0 comments on commit d59a7a2

Please sign in to comment.