micromarkdown.js
micromarkdown.js copied to clipboard
mmdCSSclass blows up on valid, relative urls
Partial URLs containing only one slash and no periods cause the Javascript to blow up. E.g.
[example](/example)
produces a Javascript error in mmdCSSclass because urlTmp only has one element, so you try to access urlTemp[-1]
Actually
[example](example)
is perfectly valid too, and would blow up earlier because urlTemp[1] does not exist
It looks like this is only trying to set a class on links, so I can probably work round this with strict=true, but that's not in your documentation.
Also experiencing this issue while trying to use it in Home Assistant https://github.com/home-assistant/home-assistant/pull/3919. Will try it with strict=True