Skip to content

Commit

Permalink
wrap mainText in single <speak> tag
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnRDOrazio committed Oct 5, 2024
1 parent 764856c commit 1818ff6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/LiturgyOfTheDay.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class LiturgyOfTheDay
private \IntlDateFormatter $monthDayFmt;
private array $queryParams = [];
private const PHONETIC_PRONUNCATION_MAPPING = [
'/Blessed( Virgin Mary)/' => '<speak><phoneme alphabet="ipa" ph="ˈblɛsɪd">Blessed</phoneme></speak> $1',
'/Blessed( Virgin Mary)/' => '<phoneme alphabet="ipa" ph="ˈblɛsɪd">Blessed</phoneme>$1',
];

public function __construct()
Expand Down Expand Up @@ -283,7 +283,7 @@ private function prepareMainText(Festivity $festivity, int $idx): string
//Fix some phonetic pronunciations
foreach (LiturgyOfTheDay::PHONETIC_PRONUNCATION_MAPPING as $key => $value) {
if (preg_match($key, $mainText) === 1) {
$mainText = preg_replace($key, $value, $mainText);
$mainText = "<speak>" . preg_replace($key, $value, $mainText) . "</speak>";
}
}
}
Expand Down

0 comments on commit 1818ff6

Please sign in to comment.