URL fragment will be turned into tag if fragment is the same as a tag in the post
Recently published a post and it's showing some issues with the rendering logic. Thought I should post an issue about these.
Issue A:
[code]git clone https://github.com/yacy/yacy_search_server.git
...[/code]
renders as:
git clone [url=https://github.com/yacy/yacy_search_server.git]https://github.com/yacy/yacy_search_server.git[/url]
...
It urilifies the URL inside a multiline code block. Note: it doesn't happen when the code block is single line. So I had to add a test ...
line to reproduce this issue.
Issue B:
[code]...
# Test comment
...[/code]
renders as:
...
[h1]Test comment[/h1]
...
Text after #<space>
inside a code
tag shouldn't be converted to h1
, rather stay as is (rather should be applied to text outside code
tag). Note: This happens on multiline code tag too with at least some text before the #
line. This happens for ##<space>
too, that's why I've used #-
instead to rememdy this.
Issue C:
Test [url=https://yacy.net/download_installation/#yacy-for-linux-and-other-os]https://yacy.net/download_installation/#yacy-for-linux-and-other-os[/url]
...
#yacy
renders as:
Test [url=https://yacy.net/download_installation/#yacy-for-linux-and-other-os]https://yacy.net/download_installation/#yacy-for-linux-and-other-os[/url]
...
#yacy
I've tested this with many hashtags, but #yacy
in this case does not render the url
tag as an actual URL but rather shows it as literal code. I've tried the following code and the issue still occurs:
Test [url=https://yacy.net/download_installation/#ZOO-for-linux-and-other-os]https://yacy.net/download_installation/#ABCDDOESNTMATTER-for-linux-and-other-os[/url]
...
#ZOO
So I guess if the anchor in url
href and the hashtag has matching text, it causes this issue.