-
-
Notifications
You must be signed in to change notification settings - Fork 3
Autolink support without <...> #12
Comments
Have a look at OSSchools/commonmark-ext to see how I've done this. You can pretty much copy it although you'll need to remove the URLMeta stuff (automatic titling of links based on webpage title) I should also mention that there is code for strike though support in that repo as well for #6 |
Their approach of using an inline parser seems... really expensive. It's literally matching ever alphanumeric character and then doing a regexp check on... everything. I think it would make more sense to implement a DocumentProcessorInterface extension after all is said and done to do a global match and replace for any remaining stragglers that haven't been caught. |
@tankerkiller125
I don't want markdown rendering library have code to fetch remotes via curl. violates single responsibility principle. |
@colinodell maybe you want(can, please!?:) to create single purpose supported version under i have this in checklist to transition to commonmark: |
Yep I will work on creating this. I'll either be following @MarkCarver's suggestion or thephpleague/commonmark#345 if that seems to be viable |
I think the big end goal would be to have GFM (GitHub Flavored Markdown / GitLab Flavored Markdown) enable-able with single extension: currently picking features one by one while just want what people are accustomed for, and that's GFM! |
@glensc That package was designed specifically for the core project they were built, hence the Laravel requirements and other requirements. The actual code for the auto-linking however did not require those extra dependencies. |
This has been implemented via https://github.com/thephpleague/commonmark-ext-autolink/blob/v0.1.0/src/AutolinkExtension.php. We'll pull it into here as a dependency. |
See thephpleague/commonmark#308
The text was updated successfully, but these errors were encountered: