Skip to content

Commit

Permalink
8733: Failed test: Einzelne Wörter/Sätze im Text formatierten
Browse files Browse the repository at this point in the history
  • Loading branch information
alex40724 committed Nov 14, 2023
1 parent 07195aa commit b730108
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Services/COPage/classes/class.ilPCParagraph.php
Original file line number Diff line number Diff line change
Expand Up @@ -1276,18 +1276,18 @@ public static function xml2output(
// anchor
while (preg_match('~<Anchor(' . $any . '/)>~i', $a_text, $found)) {
$attribs = self::attribsToArray($found[1]);
$a_text = str_replace("<Anchor" . $found[1] . ">", "[anc name=\"" . $attribs["Name"] . "\"][/anc]", $a_text);
$a_text = str_replace("<Anchor" . $found[1] . ">", "[anc name=\"" . ($attribs["Name"] ?? ""). "\"][/anc]", $a_text);
}
while (preg_match('~<Anchor(' . $any . ')>~i', $a_text, $found)) {
$attribs = self::attribsToArray($found[1]);
$a_text = str_replace("<Anchor" . $found[1] . ">", "[anc name=\"" . $attribs["Name"] . "\"]", $a_text);
$a_text = str_replace("<Anchor" . $found[1] . ">", "[anc name=\"" . ($attribs["Name"] ?? "") . "\"]", $a_text);
}
$a_text = str_replace("</Anchor>", "[/anc]", $a_text);

// marked text
while (preg_match('~<Marked(' . $any . ')>~i', $a_text, $found)) {
$attribs = self::attribsToArray($found[1]);
$a_text = str_replace("<Marked" . $found[1] . ">", "[marked class=\"" . $attribs["Class"] . "\"]", $a_text);
$a_text = str_replace("<Marked" . $found[1] . ">", "[marked class=\"" . ($attribs["Class"] ?? "") . "\"]", $a_text);
}
$a_text = str_replace("</Marked>", "[/marked]", $a_text);

Expand Down

0 comments on commit b730108

Please sign in to comment.