Merge pull request #6578 from Ixiter/develop-markdown-anchors

Markdown - Fixed bug with local anchor links
This commit is contained in:
Hypolite Petovan 2019-02-03 07:51:26 -05:00 committed by GitHub
commit e9b7b81232
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -34,6 +34,7 @@ class Markdown extends BaseObject
$MarkdownParser->hard_wrap = $hardwrap;
$MarkdownParser->code_class_prefix = 'language-';
$html = $MarkdownParser->transform($text);
$html = preg_replace('/<a(.*?)href="#/is', '<a$1href="' . ltrim($_SERVER['REQUEST_URI'], '/') . '#', $html);
self::getApp()->saveTimestamp($stamp1, "parser");