Closed noraj closed 6 years ago
here are the files concerned https://github.com/wzpan/hexo-tag-bootstrap/search?utf8=%E2%9C%93&q=marked&type=
PS : I don't know much about javascript, but are you sure you even need a markdown renderer in your code ?
PS : as currently marked is a dependency of your plugin you should add it in package.json or if your code really need a markdown renderer and you want to support markdown-it as well you may want to add something like a try catch with the different markdown renderer used by hexo: marked, kramdown, markdown-it, pandoc
Hi @noraj1337 , I use markdown-it too and it works in my blog. Such incompatible issue may relates to a recent pull request (#7 ) that use mark as renderer rather than use helper.
I will make a commit to fix it soon.
I found those new tag plugins that are introduced since #7 are strongly marked-oriented and it's not easy to remove the dependency of marked from them.
For the moment, I create a bootstrap3 branch that should work with any renderers. Also you can downgrade your hexo-tag-bootstrap to 0.0.8 by executing:
npm uninstall hexo-tag-bootstrap
npm install --save hexo-tag-bootstrap@0.0.8
Please tell me whether these methods help.
I will try and adjust it so it works with markdown-it as well, the card control is the one that needs the rendered output adjusted to fit the bootstrap spec
I can't test right now. I opened an issue on hexo repo too https://github.com/hexojs/hexo/issues/2936
@wzpan I went back to hexo-tag-bootstrap@0.0.8 until @corinis or someone else give a proper way to avoid marked dependency.
Added a fix for the dependencyin the PR #10
I'll test as soon as it will be merged
@wzpan I saw that PR #10 was merged and that a release 0.1.2 is available on npmjs and was release 22 hours ago. But on your git repository I see no tag, no release, and package.json is still showing 0.1.1 so how are you release new package to npmjs?
I tried 0.1.2
and it's working without marked.
I use
hexo-renderer-markdown-it
instead ofhexo-renderer-marked
as markdown renderer buthexo-tag-bootstrap
only works with marked.Your plugin should works with all markdown renderer.
Note that both markdown renderer cannot co-exist: https://github.com/hexojs/hexo-renderer-markdown-it/wiki/Getting-Started