We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cf79981 commit edfa29bCopy full SHA for edfa29b
src/Comment.php
@@ -60,14 +60,15 @@ protected function reset()
60
protected function doStrip(string $json): string
61
{
62
$return = '';
63
+ $crlf = ["\n" => '\n', "\r" => '\r'];
64
65
while (isset($json[++$this->index])) {
66
list($prev, $char, $next) = $this->getSegments($json);
67
68
$return = $this->checkTrail($char, $return);
69
70
if ($this->inStringOrCommentEnd($prev, $char, $char . $next)) {
- $return .= $char;
71
+ $return .= $this->inStr && isset($crlf[$char]) ? $crlf[$char] : $char;
72
73
continue;
74
}
0 commit comments