Skip to content

Commit

Permalink
Merge pull request #13 from alexander-nitsche/task-adapt-to-vanderlee…
Browse files Browse the repository at this point in the history
…-syllable-changes

TASK: Adaption to the latest features of vanderlee/syllable
  • Loading branch information
jonnitto authored May 29, 2023
2 parents ff4a337 + 5565d00 commit a6a3b69
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions Classes/Fusion/Implementation.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,7 @@ public function evaluate()
}

$syllable = new Syllable($language);
$syllable->setLibxmlOptions(LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);


$syllable->getSource()->setPath($this->languagesDirectory);
$syllable->getCache()->setPath($cacheDirectory);

Expand All @@ -117,9 +116,7 @@ public function evaluate()

switch ($this->getType()) {
case 'html':
$html = '<div>' . mb_convert_encoding($this->getContent(), 'HTML-ENTITIES', "UTF-8") . '</div>';
$result = $syllable->hyphenateHtml($html);
$result = substr(trim($result), 5, -6);
$result = $syllable->hyphenateHtmlText($this->getContent());
break;
case 'test':
// Break missing intendedly
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"require": {
"neos/flow": "*",
"neos/fusion": "^4.3 || ^5.0 || ^7.0 || ^8.0",
"vanderlee/syllable": "^1.5"
"vanderlee/syllable": "^1.7"
},
"authors": [
{
Expand Down

0 comments on commit a6a3b69

Please sign in to comment.