Skip to content

Commit 3c7ed65

Browse files
makenowjustRX14
authored andcommitted
Fix to keep double quote of symbol in syntax higlight for crystal docs (#5238)
1 parent eb4fa17 commit 3c7ed65

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/compiler/crystal/tools/doc/highlighter.cr

+1-6
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,7 @@ module Crystal::Doc::Highlighter
3232
when :CHAR
3333
highlight token.raw, "s", io
3434
when :SYMBOL
35-
sym = token.value.to_s
36-
if Symbol.needs_quotes?(sym)
37-
highlight HTML.escape(%(:#{sym.inspect})), "n", io
38-
else
39-
highlight ":#{sym}", "n", io
40-
end
35+
highlight HTML.escape(token.raw), "n", io
4136
when :CONST, :"::"
4237
highlight token, "t", io
4338
when :DELIMITER_START

0 commit comments

Comments
 (0)