sforkowany z mirror/friendica
Markdown - fixed bug in local anchor links, optimized replacer
rodzic
990cc45a26
commit
0ca762001b
|
@ -34,7 +34,7 @@ class Markdown extends BaseObject
|
||||||
$MarkdownParser->hard_wrap = $hardwrap;
|
$MarkdownParser->hard_wrap = $hardwrap;
|
||||||
$MarkdownParser->code_class_prefix = 'language-';
|
$MarkdownParser->code_class_prefix = 'language-';
|
||||||
$html = $MarkdownParser->transform($text);
|
$html = $MarkdownParser->transform($text);
|
||||||
$html = str_replace('<a href="#', '<a href="' . ltrim($_SERVER['REQUEST_URI'], '/') . '#', $html);
|
$html = preg_replace('/<a(.*?)href="#/is', '<a$1href="' . ltrim($_SERVER['REQUEST_URI'], '/') . '#', $html);
|
||||||
|
|
||||||
self::getApp()->saveTimestamp($stamp1, "parser");
|
self::getApp()->saveTimestamp($stamp1, "parser");
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue