Why Remarkup Is Good?

Phabricator uses Remarkup it is good for a couple of reasons1:

Multi-stage rendering Remarkup has a rendering pipeline which allows us parse and finalize remarkup documents in separate batched stages, and use caches while keeping dynamic parts (e.g., object visibility) dynamic. Other markup engines generally have a single-stage, unbatched pipeline. A single-stage pipeline has far poorer performance than Remarkup’s pipeline.

Multiple rendering targets Remarkup supports rendering to HTML and to plain text (for email). Some other engines do not.

Extensible Remarkup is rule-based with a flexible grammar. New rules can be implemented in PHP in a few minutes. Popular Markdown parsers like Sundown are hand-rolled C.

Similar to Markdown Remarkup is already very similar to Markdown.

No one implements Markdown Sometimes, the argument is made that GitHub (or some other service) implements Markdown so we should too. But GitHub doesn’t implement markdown – it implements “GitHub flavored Markdown”, which is about as similar to Markdown as Remarkup is. Even beyond this, part of Markdown is inline HTML, which obviously no one implements because it’s completely insecure.

Markdown and Software Markdown includes a rule for _emphasis_, which conflicts with source code symbols. Markdown includes rules around [...] and (...) which conflict with array and call notation in source code, e.g. $a['callback']($param); is rendered as $a'callback';.

More Powerful Remarkup has many rules which Markdown does not, like: code blocks with syntax highlighting, object references, object embeds, mentions, macros, memes, tables, and YouTube videos. These features are extremely powerful and a core part of Phabricator’s value.



Recent articles