Skip to content

Commit 99c2a5c

Browse files
committed
Support UTF-8 tokens in standardizing line endings
1 parent ea8bb97 commit 99c2a5c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Languages/Base/Injections/AdditionInjection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
public function parse(string $content, Highlighter $highlighter): ParsedInjection
1717
{
1818
// Standardize line endings
19-
$content = preg_replace('/\R/', PHP_EOL, $content);
19+
$content = preg_replace('/\R/u', PHP_EOL, $content);
2020

2121
$content = str_replace('❷span class=❹ignore❹❸{+❷/span❸', '{+', $content);
2222
$content = str_replace('❷span class=❹ignore❹❸+}❷/span❸', '+}', $content);

src/Languages/Base/Injections/DeletionInjection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
public function parse(string $content, Highlighter $highlighter): ParsedInjection
1717
{
1818
// Standardize line endings
19-
$content = preg_replace('/\R/', PHP_EOL, $content);
19+
$content = preg_replace('/\R/u', PHP_EOL, $content);
2020

2121
$content = str_replace('❷span class=❹ignore❹❸{-❷/span❸', '{-', $content);
2222
$content = str_replace('❷span class=❹ignore❹❸-}❷/span❸', '-}', $content);

0 commit comments

Comments
 (0)