php-markdown
                                
                                
                                
                                    php-markdown copied to clipboard
                            
                            
                            
                        Easier auto linking
Even simple stuff like http://google.com or https://google.com is not auto linked.
Ah, according to markdown syntax they should be wrapped in < >, but that's kinda weird. Would be great if there was an option to auto link without angle brackets.
The <url> syntax has the benefit of working fine with URLs of any protocol. It also allows writing URLs that are not meant to be links. I don't think it's unreasonable to expect authors to write angle-bracketed URLs when they're writing in Markdown. I'm on the opinion that for blog comments, where posters are not necessarily aware of Markdown, that'd make sense.
I'm using Markdown for forum comments, so yes it's much easier to autolink without angle brackets.
The problem is that Markdown wasn't designed with that kind of usage in mind. Autolinks are only one issue for usage in blog comments or in a forum and I'm somewhat hesitant to work or even form an opinion on each issue piecemeal.
Well, big websites like GitHub and reddit use markdown, and yet allow easy auto linking. An option wouldn't hurt, would it?
Maybe, maybe not. I'll look deeper into this when I have the time. But in general each new option adds some room for misuse, interoperability problems, and bugs/conflicts unit tests will have a hard time to detect. That's true especially for options that change how the input is interpreted. I'd be much happier maintaing 2 variations of the parser than 2^n (n being the number of options).
@michelf any news on this? I would appreciate it as well. Is there an easy way to implement this? I see how you would not like to add it to the core, but maybe as some kind of plugin / extra?
I haven't fiddled with this yet. Feel free to implement it as a pull request if you want. It needs to be an option, and be disabled by default. It can probably be added to the base Markdown parser class.