Replies: 2 comments
-
We are trying to stick to CommonMark and GFM spec in the core of marked. It would be nice to have that functionality as an extension to marked. Something like: const markedPlantUml = require("marked-plant-uml");
const marked = markedPlantUml(require("marked"));
const md = `
# Some Markdown Doc
This is some nice documentation. Here comes a diagram:
@startuml my-image
Bob -> Alice : hello
@enduml
`;
const html = marked(md)
// ...do something with html // marked-plant-uml
module.exports = function (marked) {
// ...alter marked
return (md, options) => {
// ...alter md, options
return marked(md, options);
};
}; I am hoping to make marked more extensible in the near future so extensions will be easier to create and use but this should work for now and hopefully not change too much in the future. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Great, I will handle that this way and give it a try. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I am the creator/maintainer of grunt-md2html (https://github.com/bylexus/grunt-md2html), which uses
marked
to compile Markdown-to-HTML as a Grunt task.I recently have added support for PlantUML directly embedded in the Markdown file in the grund-md2html task. This would then look as follows:
The PlantUML block(s) are extracted, images are generated and the block is replaced with a Markdown image link.
So instead of just creating or issuing a PR, I want to ask you if such a functionality would be desired in marked?
If so, and if you agree, I can try to implement it and issue a PR.
Beta Was this translation helpful? Give feedback.
All reactions