Hacker News new | ask | show | jobs
by jsdwarf 877 days ago
The big problem with Markdown is that it is horribly underspecified. Everything beyond basic text formatting and hyperlinks behaves differently in each markdown dialect (e.g. tables). What is the benefit of bolting additional use cases like UI rendering onto this mess?
3 comments

There is a fully specified markup language, asciidoc, that reads similar to markdown and provides everything you'd need (as it's equivalent to docbook).

Unfortunately, it's much less known and there is much less software support for it.

That's the reason why I have not used asciidoc, the libraries are either incomplete or inexistant for many languages.

Too bad because I found it superior to markdown for my uses.

The problem with AsciiDoc is that its only maintained implementation AsciiDoctor is written in Ruby, which is a nice server programming language, but not the most logical choice for a multi-platform desktop documentation tool. Sure, there is AsciiDoctorJ, which is a Java wrapper around it, but for PDF generation, UML Diagrams etc you land pretty quickly in Ruby land again, which can get complicated depending on your platform.
PlantUML works pretty good in Asciidoc? If you don't want to set up a path to the local jar, you could use Kroki if you don't mind using a service (or you could run Kroki locally).

But I get what you're saying.

There's lots of speedbumps setting up graphing renderers, and the non-Ruby PDF engines aren't optimal (asciidoctor-web-pdf, which is the Paged.JS/CSS PDF toolchain) or they're too arcane for casual users (the DocBook stuff, i.e. DocToolChain/DBXSL/FOPUB). As for the core processor, though, AsciidoctorJS is pacing more or less hand in hand with core Asciidoctor.

Speaking for myself, it was worth the hit, but I'm an edge case. I work primarily with hardware/manufacturing, so I needed the transclusion, conditionals, XML equivalence[1], decent tables, front matter/indices/running content, etc, all in one core spec, because it takes eight months to get a new piece of software. Running back and forth to get permission for every Markdown extension and variant was a non-starter :D

[1] To a nice "relatively sane" XML spec like DocBook

I think the target is Python programmers that don't know about UI dev. Markdown is one (potentially confusing, I admit) way to create simple output, with a trivial layout. One can create a Python variable, reference it with a pretty simple syntax and get the thing displayed on a web page in the blink of an eye. There's also a Visual Studio Code extension that provides a preview of the page if needed.

For a finer control of the rendering, HTML is still available.

Is this still true with the commonmark spec?

https://commonmark.org/

CommonMark is a very basic Markdown specification — simple inline formatting, headings, lists, code blocks. It's pretty much Gruber Markdown + fenced code blocks. Many documents need some more features, like tables, but CommonMark doesn't support them, and there are a few table styles in use in different Markdown implementations.