We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e8c56ab commit d79c6baCopy full SHA for d79c6ba
lib/coderay/encoders/html.rb
@@ -206,11 +206,11 @@ def text_token text, kind
206
style = @span_for_kinds[@last_opened ? [kind, *@opened] : kind]
207
208
text = EscapeUtils.escape_html(text)
209
- # if text.index(/[\0-\t\xB-\x1F]/)
210
- # # Escape ASCII control codes except \x9 == \t and \xA == \n.
211
- # text.tr!("\0-\x8\xB-\x1F", ' ') if text.index(/[\0-\x8\xB-\x1F]/)
212
- # text.gsub!("\t", @expand_tab) if text.index("\t")
213
- # end
+ if text.index(/[\0-\t\xB-\x1F]/)
+ # Escape ASCII control codes except \x9 == \t and \xA == \n.
+ text.tr!("\0-\x8\xB-\x1F", ' ') if text.index(/[\0-\x8\xB-\x1F]/)
+ text.gsub!("\t", @expand_tab) if text.index("\t")
+ end
214
215
text = break_lines(text, style) if @break_lines && (style || @opened.size > 0) && text.index("\n")
216
0 commit comments