1
0
mirror of https://github.com/typemill/typemill.git synced 2025-07-31 19:30:40 +02:00

fix escape backslash in ToC

This commit is contained in:
trendschau
2022-10-14 22:37:31 +02:00
parent 5cdfbc38fc
commit 8242d787c0
2 changed files with 65 additions and 52 deletions

View File

@@ -422,8 +422,11 @@ class ParsedownExtension extends \ParsedownExtra
{
$markup .= '<ul>';
}
$markup .= '<li class="' . $headline['name'] . '"><a href="#' . $headline['attribute'] . '">' . $headline['text'] . '</a>';
# unescape
$uheadline = preg_replace('/\\\\(?=[*_])/', '', $headline['text']);
$markup .= '<li class="' . $headline['name'] . '"><a href="#' . $headline['attribute'] . '">' . $uheadline . '</a>';
if($thisLevel == $nextLevel )
{