jeffbski / markdown-it-modify-token Goto Github PK
View Code? Open in Web Editor NEWmarkdown-it plugin for modifying tokens in a markdown document. It can for example modify content or attributes for certain type of elements like links or images.
markdown-it plugin for modifying tokens in a markdown document. It can for example modify content or attributes for certain type of elements like links or images.
Hey @jeffbski,
another improvement in my eyes would be to move the options e.g. the modify function to the use statement itself. Similar to https://github.com/markdown-it/markdown-it-container.
You could do it like this:
let modifyToken = () => …
let md = require('markdown-it')()
.use(require('markdown-it-modify-token'), modifyToken); // or defining an anonymous fn here.
I think this would clean up the usage a bit more, as the config and the plugin would be grouped together.
Thanks for your work!
Hello!
I'm looking for something that might help me remove tags from a markdown, specifically H1s.
Could your plugin do this?
Hey @jeffbski,
this plugin is pretty neat and does pretty much exactly what I neat, thank you very much.
I think it could be even easier to use if you would add some documentation about the token
object to the docs I am thinking of:
token.type
s (the are specific to markdown-it, correct)Attributes and such can all be changed, correct? All using their default name as used on html? (If so I would think this needs no explanation).
Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.