Hacker News new | ask | show | jobs
by toqy 1467 days ago
> For some prettier mark up.

But then if you run it through Prettier it'll add all the closing tags for you :)

1 comments

If you’re running it through a processor, why it just write markdown and call it a day?
Is there a standard definition for the "Markdown" -language?

There are several for HTML different versions and it is standardized that you can omit some closing tags and some tags altogether.

The benefit of writing in a standardized language is that later you or anybody can run tools against your sources that check for conformity.

So that is why I prefer HTML. But I would like to hear your opinion on what is the best mark-down dialect currently?

Yes, CommonMark is a standard with implementations in many different languages.
That is an interesting development.

From their Github page I read: "The spec contains over 500 embedded examples which serve as conformance tests."

So it's not so simple any more, is it?

(https://github.com/commonmark/commonmark-spec)

Less than a 1000 conformance tests for a standard? Sounds Pretty simple to me, no way you could make an HTML compliance suite that small.
> So it's not so simple any more, is it?

I claimed the specification existed, I didn’t claim it was a simple specification.

I'm not claiming you claimed it was a simple specification :-)

I just find it interesting. This would indicate to me that there are 500 "features" in the language. I thought mark-down languages just provided a few shortcuts for producing the most commonly needed HTML features and then provide a fallback to HTML. So if you cannot do it in the markdown language, use HTML instead.

Well, one simply formats the source file as you write it. The other requires a infile -> outfile build step that's more complex.

Whether the latter is worth it tends to depend on other things than parse time.

Why would I care if one is merely “formatting” or not? If I have to run a tool either way, I would prefer one that accepts a user-friendly input language and decouples content from presentation.
Because transforming an .md file into an .html file is a lot more invasive (though taken for granted here I think) than just writing the .html file. It's a build step where there wasn't one before.

I'm not saying it's never worth it.

How does Markdown decouple content from presentation?
You typically write your content in markdown and merge it with HTML templates and CSS.