Skip to content

Commit

Permalink
restore JoliCode but disable Hyphenation
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinDev committed Jan 7, 2024
1 parent df7bcc5 commit c7228aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/admin-block-editor/src/EditorJsPurifier.php
Expand Up @@ -43,7 +43,7 @@ public function __invoke(string $raw): string

private function getFixer(): Fixer
{
$fixer = new Fixer(['Ellipsis', 'Dimension', 'Unit', 'Dash', 'SmartQuotes', 'FrenchNoBreakSpace', 'NoSpaceBeforeComma', 'CurlyQuote', 'Hyphen', 'Trademark']);
$fixer = new Fixer(['Ellipsis', 'Dimension', 'Unit', 'Dash', 'SmartQuotes', 'FrenchNoBreakSpace', 'NoSpaceBeforeComma', 'CurlyQuote', 'Trademark']);

if (\in_array($this->locale, ['fr', 'fr_FR'], true)) {
$fixer->setLocale('fr_FR');
Expand All @@ -60,7 +60,7 @@ public function htmlPurifier(string $text): string
$text = preg_replace('# </([a-z]+)>#i', '</$1> ', $text) ?? throw new \Exception($text);

// TODO fix the add of space insecable
// $text = $this->getFixer()->fix($text);
$text = $this->getFixer()->fix($text);

return trim($text);
}
Expand Down

0 comments on commit c7228aa

Please sign in to comment.