1
0
mirror of https://github.com/typemill/typemill.git synced 2025-07-31 11:20:15 +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

110
composer.lock generated
View File

@@ -284,31 +284,31 @@
},
{
"name": "laminas/laminas-permissions-acl",
"version": "2.9.0",
"version": "2.10.0",
"source": {
"type": "git",
"url": "https://github.com/laminas/laminas-permissions-acl.git",
"reference": "cd5689d8360c9a3f29bb62b32fc8ad45e0947e1e"
"reference": "e927ae0a3001655fea97eb240eeea9d10638e82f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laminas/laminas-permissions-acl/zipball/cd5689d8360c9a3f29bb62b32fc8ad45e0947e1e",
"reference": "cd5689d8360c9a3f29bb62b32fc8ad45e0947e1e",
"url": "https://api.github.com/repos/laminas/laminas-permissions-acl/zipball/e927ae0a3001655fea97eb240eeea9d10638e82f",
"reference": "e927ae0a3001655fea97eb240eeea9d10638e82f",
"shasum": ""
},
"require": {
"php": "^7.3 || ~8.0.0 || ~8.1.0"
"php": "^7.4 || ~8.0.0 || ~8.1.0"
},
"conflict": {
"laminas/laminas-servicemanager": "<3.0",
"zendframework/zend-permissions-acl": "*"
},
"require-dev": {
"laminas/laminas-coding-standard": "~1.0.0",
"laminas/laminas-servicemanager": "^3.0.3",
"laminas/laminas-coding-standard": "~2.3.0",
"laminas/laminas-servicemanager": "^3.15.1",
"phpunit/phpunit": "^9.5.0",
"psalm/plugin-phpunit": "^0.15.1",
"vimeo/psalm": "^4.7"
"psalm/plugin-phpunit": "^0.17.0",
"vimeo/psalm": "^4.24.0"
},
"suggest": {
"laminas/laminas-servicemanager": "To support Laminas\\Permissions\\Acl\\Assertion\\AssertionManager plugin manager usage"
@@ -343,7 +343,7 @@
"type": "community_bridge"
}
],
"time": "2021-12-03T08:59:59+00:00"
"time": "2022-07-21T09:23:39+00:00"
},
{
"name": "nikic/fast-route",
@@ -707,16 +707,16 @@
},
{
"name": "slim/slim",
"version": "3.12.3",
"version": "3.12.4",
"source": {
"type": "git",
"url": "https://github.com/slimphp/Slim.git",
"reference": "1c9318a84ffb890900901136d620b4f03a59da38"
"reference": "ce3cb65a06325fc9fe3d0223f2ae23113a767304"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/slimphp/Slim/zipball/1c9318a84ffb890900901136d620b4f03a59da38",
"reference": "1c9318a84ffb890900901136d620b4f03a59da38",
"url": "https://api.github.com/repos/slimphp/Slim/zipball/ce3cb65a06325fc9fe3d0223f2ae23113a767304",
"reference": "ce3cb65a06325fc9fe3d0223f2ae23113a767304",
"shasum": ""
},
"require": {
@@ -734,7 +734,7 @@
},
"require-dev": {
"phpunit/phpunit": "^4.0",
"squizlabs/php_codesniffer": "^2.5"
"squizlabs/php_codesniffer": "^3.6.0"
},
"type": "library",
"autoload": {
@@ -778,9 +778,19 @@
],
"support": {
"issues": "https://github.com/slimphp/Slim/issues",
"source": "https://github.com/slimphp/Slim/tree/3.x"
"source": "https://github.com/slimphp/Slim/tree/3.12.4"
},
"time": "2019-11-28T17:40:33+00:00"
"funding": [
{
"url": "https://opencollective.com/slimphp",
"type": "open_collective"
},
{
"url": "https://tidelift.com/funding/github/packagist/slim/slim",
"type": "tidelift"
}
],
"time": "2021-10-02T19:38:22+00:00"
},
{
"name": "slim/twig-view",
@@ -839,7 +849,7 @@
},
{
"name": "symfony/deprecation-contracts",
"version": "v2.5.1",
"version": "v2.5.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/deprecation-contracts.git",
@@ -886,7 +896,7 @@
"description": "A generic function and convention to trigger deprecation notices",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.1"
"source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.2"
},
"funding": [
{
@@ -906,16 +916,16 @@
},
{
"name": "symfony/event-dispatcher",
"version": "v4.4.42",
"version": "v4.4.44",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
"reference": "708e761740c16b02c86e3f0c932018a06b895d40"
"reference": "1e866e9e5c1b22168e0ce5f0b467f19bba61266a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/708e761740c16b02c86e3f0c932018a06b895d40",
"reference": "708e761740c16b02c86e3f0c932018a06b895d40",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/1e866e9e5c1b22168e0ce5f0b467f19bba61266a",
"reference": "1e866e9e5c1b22168e0ce5f0b467f19bba61266a",
"shasum": ""
},
"require": {
@@ -970,7 +980,7 @@
"description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/event-dispatcher/tree/v4.4.42"
"source": "https://github.com/symfony/event-dispatcher/tree/v4.4.44"
},
"funding": [
{
@@ -986,11 +996,11 @@
"type": "tidelift"
}
],
"time": "2022-05-05T15:33:49+00:00"
"time": "2022-07-20T09:59:04+00:00"
},
{
"name": "symfony/event-dispatcher-contracts",
"version": "v1.1.12",
"version": "v1.1.13",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher-contracts.git",
@@ -1049,7 +1059,7 @@
"standards"
],
"support": {
"source": "https://github.com/symfony/event-dispatcher-contracts/tree/v1.1.12"
"source": "https://github.com/symfony/event-dispatcher-contracts/tree/v1.1.13"
},
"funding": [
{
@@ -1069,16 +1079,16 @@
},
{
"name": "symfony/finder",
"version": "v5.4.8",
"version": "v5.4.11",
"source": {
"type": "git",
"url": "https://github.com/symfony/finder.git",
"reference": "9b630f3427f3ebe7cd346c277a1408b00249dad9"
"reference": "7872a66f57caffa2916a584db1aa7f12adc76f8c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/finder/zipball/9b630f3427f3ebe7cd346c277a1408b00249dad9",
"reference": "9b630f3427f3ebe7cd346c277a1408b00249dad9",
"url": "https://api.github.com/repos/symfony/finder/zipball/7872a66f57caffa2916a584db1aa7f12adc76f8c",
"reference": "7872a66f57caffa2916a584db1aa7f12adc76f8c",
"shasum": ""
},
"require": {
@@ -1112,7 +1122,7 @@
"description": "Finds files and directories via an intuitive fluent interface",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/finder/tree/v5.4.8"
"source": "https://github.com/symfony/finder/tree/v5.4.11"
},
"funding": [
{
@@ -1128,7 +1138,7 @@
"type": "tidelift"
}
],
"time": "2022-04-15T08:07:45+00:00"
"time": "2022-07-29T07:37:50+00:00"
},
{
"name": "symfony/polyfill-ctype",
@@ -1456,16 +1466,16 @@
},
{
"name": "symfony/yaml",
"version": "v5.4.3",
"version": "v5.4.14",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
"reference": "e80f87d2c9495966768310fc531b487ce64237a2"
"reference": "e83fe9a72011f07c662da46a05603d66deeeb487"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/yaml/zipball/e80f87d2c9495966768310fc531b487ce64237a2",
"reference": "e80f87d2c9495966768310fc531b487ce64237a2",
"url": "https://api.github.com/repos/symfony/yaml/zipball/e83fe9a72011f07c662da46a05603d66deeeb487",
"reference": "e83fe9a72011f07c662da46a05603d66deeeb487",
"shasum": ""
},
"require": {
@@ -1511,7 +1521,7 @@
"description": "Loads and dumps YAML files",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/yaml/tree/v5.4.3"
"source": "https://github.com/symfony/yaml/tree/v5.4.14"
},
"funding": [
{
@@ -1527,20 +1537,20 @@
"type": "tidelift"
}
],
"time": "2022-01-26T16:32:32+00:00"
"time": "2022-10-03T15:15:50+00:00"
},
{
"name": "twig/twig",
"version": "v2.15.1",
"version": "v2.15.3",
"source": {
"type": "git",
"url": "https://github.com/twigphp/Twig.git",
"reference": "3b7cedb2f736899a7dbd0ba3d6da335a015f5cc4"
"reference": "ab402673db8746cb3a4c46f3869d6253699f614a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/3b7cedb2f736899a7dbd0ba3d6da335a015f5cc4",
"reference": "3b7cedb2f736899a7dbd0ba3d6da335a015f5cc4",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/ab402673db8746cb3a4c46f3869d6253699f614a",
"reference": "ab402673db8746cb3a4c46f3869d6253699f614a",
"shasum": ""
},
"require": {
@@ -1595,7 +1605,7 @@
],
"support": {
"issues": "https://github.com/twigphp/Twig/issues",
"source": "https://github.com/twigphp/Twig/tree/v2.15.1"
"source": "https://github.com/twigphp/Twig/tree/v2.15.3"
},
"funding": [
{
@@ -1607,7 +1617,7 @@
"type": "tidelift"
}
],
"time": "2022-05-17T05:46:24+00:00"
"time": "2022-09-28T08:40:08+00:00"
},
{
"name": "vlucas/valitron",
@@ -1615,12 +1625,12 @@
"source": {
"type": "git",
"url": "https://github.com/vlucas/valitron.git",
"reference": "d0fb8ee84c96f68dcd06983475838780aed5c6c7"
"reference": "fadce39f5f235755bb9794b2573af2d5bfcba85f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/vlucas/valitron/zipball/d0fb8ee84c96f68dcd06983475838780aed5c6c7",
"reference": "d0fb8ee84c96f68dcd06983475838780aed5c6c7",
"url": "https://api.github.com/repos/vlucas/valitron/zipball/fadce39f5f235755bb9794b2573af2d5bfcba85f",
"reference": "fadce39f5f235755bb9794b2573af2d5bfcba85f",
"shasum": ""
},
"require": {
@@ -1659,7 +1669,7 @@
],
"support": {
"issues": "https://github.com/vlucas/valitron/issues",
"source": "https://github.com/vlucas/valitron/tree/master"
"source": "https://github.com/vlucas/valitron/tree/v1.4.11"
},
"funding": [
{
@@ -1667,7 +1677,7 @@
"type": "tidelift"
}
],
"time": "2022-03-16T09:16:07+00:00"
"time": "2022-10-14T11:54:24+00:00"
}
],
"packages-dev": [],

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 )
{