Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Down-casing inconsistent on href/id #17

Closed
jrep opened this issue Sep 12, 2013 · 1 comment
Closed

Down-casing inconsistent on href/id #17

jrep opened this issue Sep 12, 2013 · 1 comment

Comments

@jrep
Copy link

jrep commented Sep 12, 2013

Is it a rule that "labels" (internal hrefs) have to be lower case? I can't find that documented. But if I try upper case, the href's get down-cased but the id's do not:

> cat bug.md
Lorem ipsum [SOA record] [SOA] magni dolores.
# Nam libero tempore [SOA]

but ....

> multimarkdown bug.md
<p>Lorem ipsum <a href="#soa">SOA record</a> magni dolores.</p>
<h1 id="SOA">Nam libero tempore</h1>

The href to "#soa" doesn't connect to the id "SOA" (as of course it should not).

MultiMarkdown version 4.2

@fletcher
Copy link
Owner

If you update to 4.3 (from source, no binaries yet), this is fixed (or perhaps a better word is consistent).

The general idea is that MMD "cleans" text that is used to generate an anchor by stripping whitespace and illegal characters. To minimize typos, it also lowercases everything. For example:

# This is a header

becomes "thisisaheader".

For consistency, it does the same thing with user specified labels, as they could technically look like:

#  This is a header [Some alternate label]

Similar things happen with table captions/labels, etc.

I recognize that an argument can be made for other behaviors, but I think this ends up being the best overall approach (as long as it is consistent.)

Thanks for writing in!

F-

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants