Skip to content

Commit

Permalink
Simplify diffsInjection line endings
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdancondorachi committed May 23, 2024
1 parent 8f93f8c commit 048f166
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Languages/Base/Injections/AdditionInjection.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
public function parse(string $content, Highlighter $highlighter): ParsedInjection
{
// Standardize line endings
$content = preg_replace("/(\r\n|\n|\r)/", PHP_EOL, $content);
$content = preg_replace('/\R/', PHP_EOL, $content);

$content = str_replace('❷span class=❹ignore❹❸{+❷/span❸', '{+', $content);
$content = str_replace('❷span class=❹ignore❹❸+}❷/span❸', '+}', $content);
Expand Down
2 changes: 1 addition & 1 deletion src/Languages/Base/Injections/DeletionInjection.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
public function parse(string $content, Highlighter $highlighter): ParsedInjection
{
// Standardize line endings
$content = preg_replace("/(\r\n|\n|\r)/", PHP_EOL, $content);
$content = preg_replace('/\R/', PHP_EOL, $content);

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

0 comments on commit 048f166

Please sign in to comment.