15 ms·
Which markdown? There are various variants out there and the original is unsuitable for more than a most basic web page. The RFC for text/markdown includes a v
by bhaak 10y ago
Which markdown? There are various variants out there and the original is unsuitable for more than a most basic web page.
The RFC for text/markdown includes a variant specifier but that only makes me think that we would be repeating the mistake of early browers when there were browser-specific HTML tags.
- verandaguy 10y agoWhich markdown? That depends on which one eventually gets specified (if at all) by some reputable standardization body. And sometimes, people don't want much more than a static web page!
- Ajedi32 10y agoGood point; we'd definitely need a standard. Thankfully, [CommonMark][1] has been in development a while now, and features a complete, unambiguous spec, reference implementation, and test suite. A little more work on that to get it to version 1.0 and we'd be golden. [1]: http://commonmark.org/ http://commonmark.org/
- legulere 10y agoIs it really unambiguous? There is no grammar, but the spec describes things in English. It's really hard to avoid ambiguities and impossible to proof unambiguousness without formal methods.
- Ajedi32 10y agoI guess it's hard to say for sure that it's completely unambiguous, but that's definitely the intent. [The spec][1] even says: > This document attempts to specify Markdown syntax unambiguously. So if you're aware of any ambiguities in the spec, those are bugs which should be reported and fixed. [1]: http://spec.commonmark.org/0.27/ http://spec.commonmark.org/0.27/
- the_duke 10y agoYou may want to work on specifying a formal grammar in EBNF or similiar. Great for library / parser implementers and it helps discover ambiguities.
- taylorfausak 10y agoFrom John MacFarlane, the author of the CommonMark spec: > If anyone wants to contribute a BNF, please do! But I'm very skeptical that it can be done, due to the many quirks of the syntax. https://github.com/jgm/CommonMark/issues/113#issuecomment-60467783 https://github.com/jgm/CommonMark/issues/113#issuecomment-60...
- dozzie 10y agoSo it's basically as useless for general processing as Markdown, because you won't have a grammar from which you can generate parser, hence all the parsers will be handcoded with various quirks differing from one to another and none of which will produce a parse tree.
- marcosdumay 10y agoIf it's hard to write a BNF, it's also hard to write a parser.
- mrottenkolber 10y agoI'm baffled. Without a formal grammar CommonMark is useless. Who implements a parser without a formal grammar?
- the_duke 10y agoIf the syntax has so many issues that you can't specify a formal grammar, there's a problem with the spec.
- gsnedders 10y agoBNF doesn't make something unambiguous. I mean, Foo = "hello" / "hello" is totally acceptable, and if you have any indirection like Foo = XXX / YYY with XXX, YYY = "hello" you can then attach different semantics to XXX and YYY despite it being ambiguous. Add in more levels of indirection, and you have a lower chance of it being trivially obvious.
- dTal 10y agoWhat a great idea. This is exactly what we need. I wonder if Markdown will ever get style annotations? Like CSS, but lighter and less broken.
- Ajedi32 10y agoWhat kind of style annotations? Markdown can already do bold, italic, and in some implementations, ~~strikethrough~~ and ^superscript. Anything much more complicated than that I think risks jeopardizing Markdown's readability in plain text format and intuitive simplicity. Markdown is meant to be focused more on content than style.
- cbhl 10y agoI think XHTML shows that trying to create the specification first puts the cart before the horse. Write software first; people will create content that matches the platforms that they care about most.
- akavel 10y agoI wonder why VFMD (http://vfmd.org http://vfmd.org) isn't the choice among people picking a Markdown specification or parser? Well specified, unambiguous, easily extensible, with a reference implementation, open-source. I'd imagine it could be at least mentioned in the RFC?
- TAForObvReasons 10y agoExtremely interesting backstory from when Standard Markdown was announced: https://news.ycombinator.com/item?id=8264733 https://news.ycombinator.com/item?id=8264733 Basically a small group of people worked in private for years while there were public community efforts, including a W3C gorup, to do the same. None of the disparate efforts coalesced into a unified front, so the simple answer is that projects advocated for whatever spec their developers backed. The community is fractured.
- aji 10y agoDoes it matter? If your email client doesn't understand enough of the markdown variant being used, then you should still be able to read the unrendered text. That's one of the great things about markdown.