blackfriday icon indicating copy to clipboard operation
blackfriday copied to clipboard

Extending parser

Open bostrt opened this issue 5 years ago • 0 comments

This application is using blackfriday for rendering markdown text inside of wiki pages: https://github.com/prologic/wiki. We've run into limitations with the current solution for converting camel-cased text into markdown links. Right now, this is done using a regex to transform all camel-cased text into something like [CamelCased](/view/CamelCased). However, sometimes this can capture text not intended to be converted into a link.

We've explored extending blackfriday with a custom renderer but I've found it is too far into the process to convert camel-cased text into new nodes for rendering (unless my findings are wrong).

I'm curious if there is a method of extending the blackfriday Parser in addition to the Renderer. I've noticed that the inlineCallback array (ref) would be helpful to have access to from an API standpoint. Is the functionality behind the inlineCallback stable enough to expose, perhaps through a public method?

bostrt avatar Feb 19 '19 05:02 bostrt