Closed thypon closed 7 years ago
Thanks for the submission, but a few questions/comments:
What exactly are you trying to "fix"? There's nothing broken, per se. There's a reason why the range of characters that constitute labels is limited -- it has to meet criteria for HTML, LaTeX, ODF, and other possible future formats. Do you have a real-life example where this causes problems? Have you tested this in other output formats?
I realize that the whitespace in the code is not always 100% consistent (my settings in Xcode aren't always customized, and sometimes that would create changes.) That said, a pull request with 64 lines of changes that really only changes a single line is difficult to check. It's much easier if the pull request only changes the minimum number of lines -- it took me several passes just to find the actual content of this request. It's fine for you to disagree with the existing whitespace, but leave it alone in this circumstance. ;)
Last, but not least, check out this page. If you want to make your case for this change for MMD-6 over there, feel free. I'm open to considering changes. But this won't be changed in MMD-5 since a new version is almost finished.
This example:
## Something 1 [ch:som1]
### Something 2 [sub:som1/som2]
[](#sub:som1/som2)
is broken actually.
Sorry for the whitespaces. My vim editor is configured to trim all of them on save https://github.com/thypon/dotconfig/blob/master/.vimrc#L82
I know there will be another release in the near future but a stable working version isn't a bad idea for now.
It's not broken, you're doing it wrong. ;) You're confusing HTML anchors (the [](#foo)
syntax) and MMD cross-references (the [][foo]
syntax). The two are different things. Your example "accidentally" works correctly some of the time because you can generally anticipate what a heading id
attribute will look like, but sometimes you can't. There are two ways to fix it. You can use a correctly anticipated HTML anchor:
## Something 1 [ch:som1]
### Something 2 [sub:som1/som2]
[](#sub:som1som2)
or you can use the expected MMD syntax (and it figures out the correct anchor for you):
## Something 1 [ch:som1]
### Something 2 [sub:som1/som2]
[][sub:som1/som2]
No worries.
MMD 5 is a stable working version. ;) That's not to say it's 100% bug free, but it's very close for most users.
this should handle cases where / is contained in labels