You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constlinksidx=md.inline.ruler.__find__('links')constoldlinks=md.inline.ruler.__rules__[linksidx].fnconstlinks=function(state,startLine,endLine,silent){console.log(state)constret=oldlinks(state,silent)if(!ret)returnfalseconsole.log(state)/* This just returns the cumulative state object, without the ability to modify the particular link instance that was just captured. */returntrue}md.inline.ruler.at("links",links)
But to add custom attributes, one would need to import all the dependencies in lib/rules_inline/links.js and basically copy/paste the function, but the lib dir does not come with the node package. Also, this API seems to be a roundabout way to override or extend parser rules. Is there a better way?
Example case: add dimensions to images with a custom extension:
For example:
But to add custom attributes, one would need to import all the dependencies in lib/rules_inline/links.js and basically copy/paste the function, but the lib dir does not come with the node package. Also, this API seems to be a roundabout way to override or extend parser rules. Is there a better way?
Example case: add dimensions to images with a custom extension:
I guess I will have to add it to the ALT text like:
but this use case could apply to any custom token such as a heading, URL, even a table with attributes, etc.
The text was updated successfully, but these errors were encountered: