fletcher / MultiMarkdown-4

This project is now deprecated. Please use MultiMarkdown-6 instead!
https://github.com/fletcher/MultiMarkdown-5
Other
307 stars 59 forks source link

_Underline Support_ #76

Closed trans closed 10 years ago

trans commented 10 years ago

I was delighted to discover MultiMarkdown today. I had long been plotting my own improved markdown format for the lack of certain features that sorely irked me. Thankfully MultiMarkdown covers a good swath of those! That leaves me with but a few troubles left to fuss about, so I thought I'd offer up my suggestions here. I will do a separate issue for each starting with this one --the oldest the of irritants in my quiver.

There is no markup for underlining. It's a pretty glaring emission, although somewhat understandable since underlines used to be the common way to highlight hyperlinks on websites, so using underlines for anything else went largely to the way side. HTML 4 even deprecated the <u> tag. But now it is back in HTML 5, and hyperlinks are more often highligthed in other ways. Moreover, using underlines actually has real grammatical uses. Can you believe it!? :wink: So it only makes sense for markdown to support it.

Of course there is one unfortunate issue with this. The obvious syntax of _foo_, is presently an alias for *foo* (as is __foo__ for **foo**). That means, to do it right, there is going to be a back-compatibility issue. On the upside however, it is a minor change. From what I have seen, most documents use the * notation anyway. And even in the cases where they have not, underlines in place of italics won't be that much of a difference. Both provide a means of emphasis. So my feeling is, go ahead and do it right.

With regard to __foo__ (two underscore instead of one) double underlining seems like the right approach. But there is no HTML tag for that. The only way to do it is via a bit of a hack:

<u><span style="border-bottom: 1px double;">foo</span></u>

I doubt that will fly, so maybe <u><em>foo</em></u> will have to do presently? Perhaps someone else has a better solution for this case.

I am hopeful that a bit of a snowball effect can get rolling here and underlines will eventually be supported by all Markdown parsers.

Thanks for such a great project btw!

fletcher commented 10 years ago

This would be a pretty fundamental change to the Markdown syntax. If it becomes a standard across the other major implementations I would add it to MultiMarkdown, but I don't intend on breaking compatibility like this at the moment.

There's also a philosophical question as to whether underscores are really just an alternative visual effect for <emph> and should be implemented via CSS. I do not plan on solving that question. ;)

trans commented 10 years ago

:frowning: The philosophical questions don't really interest me so much. There's still no markdown syntax for underlining! Sigh.

fletcher commented 10 years ago

Fair enough. But I think one of the reasons Markdown is so great is that Gruber spent time thinking about the philosophical stuff. ;)

trans commented 10 years ago

Can't quite imagine what he thought about this. I get the feeling he really disliked underlines --after all why offer two syntaxes for the same thing?

Scouring over what's out there. I found these few salient facts: