Skip to content

Commit

Permalink
Fix to keep double quote of symbol in syntax higlight for `crystal do…
Browse files Browse the repository at this point in the history
…cs` (#5238)
  • Loading branch information
makenowjust authored and RX14 committed Nov 3, 2017
1 parent eb4fa17 commit 3c7ed65
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/compiler/crystal/tools/doc/highlighter.cr
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,7 @@ module Crystal::Doc::Highlighter
when :CHAR
highlight token.raw, "s", io
when :SYMBOL
sym = token.value.to_s
if Symbol.needs_quotes?(sym)
highlight HTML.escape(%(:#{sym.inspect})), "n", io
else
highlight ":#{sym}", "n", io
end
highlight HTML.escape(token.raw), "n", io
when :CONST, :"::"
highlight token, "t", io
when :DELIMITER_START
Expand Down

0 comments on commit 3c7ed65

Please sign in to comment.