Djot

Djot

Djot

Lightweight markup language


Djot (/dʒɑt/) is a lightweight markup language that aims to improve on CommonMark's syntax where it is complex and difficult to parse efficiently.[3] It was created in 2022 by John MacFarlane, the author of Pandoc and a member of the CommonMark standardization group.[4][5]

Quick Facts Filename extension, Internet media type ...

It derives most of its features from CommonMark, but includes a wider set of features, including description lists, footnotes, tables, several new kinds of inline formatting, math and smart punctuation.[3]

The original reference implementation is written in a scripting language (Lua), but the language is designed to parse efficiently, so it is very fast.[6]

The code and documentation are released under the MIT License.[7]

Difference from CommonMark

Djot's syntax is similar to CommonMark's, but there are some differences.[8]

Blank lines

CommonMark does not need blank lines around block-level elements, but Djot does.

Example:

More information Input, Corresponding HTML produced by a CommonMark processor ...
More information Input, Corresponding HTML produced by a CommonMark processor ...

Headings

Djot has no setext (= or -) headings, only ATX (#) headings.

Example:

More information Text using CommonMark syntax, Text using Djot syntax ...

Emphasis

CommonMark uses single * or _ for emphasis, and double * or _ for strong emphasis. Djot uses single _ for emphasis, and single * for strong emphasis.

Example:

More information Text using CommonMark syntax, Text using Djot syntax ...

Unlike CommonMark, Djot has no special syntax for adding a title to a link. A title can be added by using the general attribute syntax instead.

Example:

More information Text using CommonMark syntax, Text using Djot syntax ...

Examples

More information Text using Djot syntax, Corresponding HTML produced by a Djot processor ...

Implementations

More information Name, License ...

Uses

  • Starting from version 3.1.12, Pandoc supports Djot as an input format and an output format.[9]

References

  1. "File extension". github.com. Retrieved 2023-01-24.
  2. "Release 0.2.0". 3 January 2023. Retrieved 8 January 2023.
  3. "Djot (/dʒɑt/)". djot.net. Retrieved 2022-08-13.
  4. MacFarlane, John (2022-07-11). "Initial commit". github.com. Retrieved 2022-08-13.
  5. MacFarlane, John. "Tools". johnmacfarlane.net. Retrieved 2022-08-13.
  6. "README.md". github.com. Retrieved 2023-01-24.
  7. "License". github.com. Retrieved 2022-08-13.
  8. "Quick Start for Markdown users". github.com. Retrieved 2022-08-14.
  9. "pandoc 3.1.12 (2024-02-14)". pandoc.org. Retrieved 2024-03-05.

Share this article:

This article uses material from the Wikipedia article Djot, and is written by contributors. Text is available under a CC BY-SA 4.0 International License; additional terms may apply. Images, videos and audio are available under their respective licenses.