Skip to content

Commit

Permalink
Unbreak PDF::Content testing
Browse files Browse the repository at this point in the history
Commit 97d473b hid the conversion of the "\r\n" synthetic
behind the "\r" handling.  Fixed this by moving the check for "\r\n"
forward, so that the speed increase could be maintained.
  • Loading branch information
lizmat committed Nov 15, 2020
1 parent 44d037d commit 5cbe14e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/core.c/Str.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -884,11 +884,11 @@ my class Str does Stringy { # declared in BOOTSTRAP
),
self!hexify($char), # escape since > 0
#?endif
nqp::ifnull(
nqp::atpos($escapes,$ord),
nqp::if( # not a known escape(
nqp::iseq_s($char,"\r\n"),
'\r\n', # it's the common LF
nqp::if(
nqp::iseq_s($char,"\r\n"), # <-- this is a synthetic codepoint
'\r\n', # it's the common LF
nqp::ifnull( # not a common LF
nqp::atpos($escapes,$ord),
nqp::if(
nqp::iscclass(nqp::const::CCLASS_PRINTING,$char,0),
$char, # it's a printable
Expand Down

0 comments on commit 5cbe14e

Please sign in to comment.