File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -206,11 +206,11 @@ def text_token text, kind
206
206
style = @span_for_kinds [ @last_opened ? [ kind , *@opened ] : kind ]
207
207
208
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
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
214
214
215
215
text = break_lines ( text , style ) if @break_lines && ( style || @opened . size > 0 ) && text . index ( "\n " )
216
216
You can’t perform that action at this time.
0 commit comments