MD headers links do not generate consistently with github

Count of San Francisco's Avatar

Count of San Francisco

31 Oct, 2019 07:36 PM

If I do this in MD:

## A Made-up Header

Marked 2 generates this "id" in the HTML: id="A-Made-up-Header".
Github generates this "id" in the HTML: id="a-made-up-header".

When editing text that will ultimately go into GitHub and other tools, this makes it hard to check links in Marked 2.

Can marked 2 be consistent with GitHub and Pandoc? They both lower case all the letters when forming the "id".

Thanks,

  1. Support Staff 1 Posted by Brett on 31 Oct, 2019 07:46 PM

    Brett's Avatar

    Please confirm which processing option you're currently using, MMD or
    GFM?

    -Brett

  2. 2 Posted by Count of San Fr... on 31 Oct, 2019 07:48 PM

    Count of San Francisco's Avatar

    In Marked 2's Preference under "Processor" tab, I have the "Discount (GFM)" chosen. I assume "Discount (GFM)" is the same as GFM.

    Is that what you wanted me to check?

  3. Support Staff 3 Posted by Brett on 31 Oct, 2019 07:57 PM

    Brett's Avatar

    Yep, that's what I was wondering. I thought I had set the GFM processor
    to lowercase IDs already, but if that's not the case I'll update it for
    the next release. In the meantime, I'm 90% certain that url fragments
    (hashes) aren't case sensitive anyway…

    -Brett

  4. 4 Posted by Count of San Fr... on 31 Oct, 2019 08:11 PM

    Count of San Francisco's Avatar

    HI Brett,

    That may be true. But when I click on my link that references the header in Marked 2, it doesn't bring me to that location on the same page until I matched the case.

  5. Support Staff 5 Posted by Brett on 31 Oct, 2019 08:38 PM

    Brett's Avatar

    Fair enough, I'll take a look at that code again.

    -Brett

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac