Skip to content

Commit caacb35

Browse files
committed
Minor tweak
1 parent 8fccaf0 commit caacb35

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Renderers/SpanNodeRenderer.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ public function render(): string
4747
// Work around "~" being parsed as non-breaking space by rst-parser,
4848
// while this is not part of the specification.
4949
$spanValue = $this->span->getValue();
50+
51+
if (str_contains($spanValue, '__TILDE__')) {
52+
throw new \Exception('Cannot render content containing the text "__TILDE__" as it is used as a special placeholder in the build.');
53+
}
54+
5055
$spanValue = str_replace('~', '__TILDE__', $spanValue);
5156
$this->span->setValue($spanValue);
5257

0 commit comments

Comments
 (0)