Skip to content

Commit bb5cacf

Browse files
committed
remove control codes escaping?
1 parent 00eeb88 commit bb5cacf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/coderay/encoders/html.rb

+4-4
Original file line numberDiff line numberDiff line change
@@ -204,11 +204,11 @@ def text_token text, kind
204204
style = @span_for_kinds[@last_opened ? [kind, *@opened] : kind]
205205

206206
text = EscapeUtils.escape_html(text)
207-
if text.index(/[\0-\t\xB-\x1F]/)
208-
# Escape ASCII control codes except \x9 == \t and \xA == \n.
209-
text.tr!("\0-\x8\xB-\x1F", ' ') if text.index(/[\0-\x8\xB-\x1F]/)
207+
# if text.index(/[\0-\t\xB-\x1F]/)
208+
# # Escape ASCII control codes except \x9 == \t and \xA == \n.
209+
# text.tr!("\0-\x8\xB-\x1F", ' ') if text.index(/[\0-\x8\xB-\x1F]/)
210210
text.gsub!("\t", @expand_tab) if text.index("\t")
211-
end
211+
# end
212212

213213
text = break_lines(text, style) if @break_lines && (style || @opened.size > 0) && text.index("\n")
214214

0 commit comments

Comments
 (0)