Closed algernon closed 2 years ago
I'm definitely open to extending the functionality to be compatible with other parsers. The regex is indeed the spot that handles reference parsing, and a PR would be very welcome. As long as the current tests pass, I don't see a problem extending functionality for new cases.
Sweet. I'll see what I can do over the next few days!
I've recently migrated my static site generator from pegdown to markdown-clj, and noticed that markdown-clj is a lot stricter in many cases where I believe it shouldn't be. For example, reference links like
[some text][foo:bar]
or[some text][foo/bar]
are not allowed (as in: they're not recognised as link references, causing misrendering, and markdown appearing in the html verbatim), while pretty much any other markdown parser handles them fine, and my reading of the CommonMark spec suggests that these should be valid references, too.I suspect this is the place, but there are a couple of other places in that file with similar-ish regexes, so I'm not sure.
I'd like to inquire whether a pull request that relaxes the restriction, and allows both
:
and/
in references would be accepted? With appropriate tests included, of course.