projects
/
friendica.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9a5f982
)
Markdown - fixed bug in local anchor links
author
peter
<peter@jean-luc-picard>
Sun, 3 Feb 2019 02:23:47 +0000
(
03:23
+0100)
committer
peter
<peter@jean-luc-picard>
Sun, 3 Feb 2019 02:23:47 +0000
(
03:23
+0100)
src/Content/Text/Markdown.php
patch
|
blob
|
history
diff --git
a/src/Content/Text/Markdown.php
b/src/Content/Text/Markdown.php
index e54234bffefc13cafe45c08935a5dd341579f674..4e00ae78102624e8e2f66bdce15dc9415cf149ed 100644
(file)
--- a/
src/Content/Text/Markdown.php
+++ b/
src/Content/Text/Markdown.php
@@
-34,6
+34,7
@@
class Markdown extends BaseObject
$MarkdownParser->hard_wrap = $hardwrap;
$MarkdownParser->code_class_prefix = 'language-';
$html = $MarkdownParser->transform($text);
+ $html = str_replace('<a href="#', '<a href="' . ltrim($_SERVER['REQUEST_URI'], '/') . '#', $html);
self::getApp()->saveTimestamp($stamp1, "parser");