Open ElnuDev opened 1 year ago
What markdown spec allows capitalized names? As far as I know all the parsers agree fully lowercased names are the canonical form. I don't even think VIM will accept that as a filetype, we'd have to do the case casting ourselves instead of just passing it through.
The CommonMark spec "doesn’t mandate any particular treatment of the info string" according to its documentation , so I don't think there's any reason to think they're disallowed. Even if lowercased names are considered canonical, they still work in every single parser I've used, including GitHub's. Shouldn't the plugin agree with parser outputs? I don't really see any disadvantage in having capitalized info strings work properly, not having them work properly just makes vim-markdown appear broken for people who use a convention of capitalizing language names.
It's not like vim-markdown doesn't render capitalized names at all anyway, it just acts buggy when they're around, being temperamental whether or not it decides to highlight them.
Okay, if other parsers normalize this I suppose we can too. The VIM filetype
s we have to map to are all lower case, but I'd be happy to facilitate a PR that normalizes these before passing them to VIM.
Alright! I'll make a PR soon.
There's an issue with how capitalization is handled in fenced code blocks. In my configuration, I've set
rs
to be associated with Rust:However, if I open a markdown file and enter the following: