Closed myell0w closed 10 years ago
I was checking through the source and it seems there is already support for autolink but it's not connected up. Was there a reason for this? Cheers
No, not that I know of. Care to have a hand at hooking it up?
I took a look at the autolink handling and from my understanding the problem is that "autolinks" in Soldouts sense are links contained within < > - brackets. The corresponding line in markdown.c (1702):
rndr.active_char['<'] = char_langle_tag;
So the autlink-handling is only triggered, if the links starts with "<", which isn't particularly helpful. any ideas on how to improve this? The problem is that an additional pass to parse standard autolinks will take up more time, I'd love to have this handled within the markdown parser.
In /bypass/src/parser.cpp autolink is set to NULL where as link is set to rndr_link:
NULL, // autolink
rndr_link, // link
It's worth noting inline links get garbled at the moment too, a simple example is:
http:\\www.google.com
Becomes:
http:www.google.com
I've started to hook up the autolink callback, but it doesn't work yet. Anyone care to help? You can find the discussion over at https://github.com/Uncodin/bypass-core/pull/5
I don't know if I'm missing something, but it seems that normal URLs in the markdown text without markdown syntax (text)[url] aren't marked with "BPLinkStyleAttributeName". I think this would be a nice addition, especially since it's part of the Markdown specs.