micromarkdown.js icon indicating copy to clipboard operation
micromarkdown.js copied to clipboard

mmdCSSclass blows up on valid, relative urls

Open davidearl opened this issue 8 years ago • 1 comments

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.

davidearl avatar Jun 28 '16 18:06 davidearl

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

kellerza avatar Oct 19 '16 19:10 kellerza