In today's world, Djot has gained great relevance in various areas of society. Its impact has been reflected in politics, the economy, culture, and even in people's daily lives. Throughout history, Djot has been the subject of various debates and analyses, arousing the interest of academics, specialists, and the general public. In this article, we will explore the many facets of Djot, examining its influence in the current context and projecting its importance in the future. From its origin to its implications in contemporary life, Djot invites us to reflect and better understand the world around us.
Filename extension | |
---|---|
Internet media type | unknown value |
Developed by | John MacFarlane |
Latest release | |
Type of format | Lightweight markup language |
Extended from | CommonMark |
Open format? | Yes |
Free format? | Yes |
Website | djot |
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. It was created in 2022 by John MacFarlane, the author of Pandoc and a member of the CommonMark standardization group.
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.
The original reference implementation is written in a scripting language (Lua), but the language is designed to parse efficiently, so it is very fast.
The code and documentation are released under the MIT License.
Djot's syntax is similar to CommonMark's, but there are some differences.
CommonMark does not need blank lines around block-level elements, but Djot does.
Example:
Input | Corresponding HTML produced by a CommonMark processor | Corresponding HTML produced by a Djot processor |
---|---|---|
# Heading
Paragraphs.
|
<h1>Heading</h1>
<p>Paragraphs.</p>
|
<h1>Heading Paragraphs.</h1>
|
# Heading
Paragraphs.
|
<h1>Heading</h1>
<p>Paragraphs.</p>
|
<h1>Heading</h1>
<p>Paragraphs.</p>
|
Input | Corresponding HTML produced by a CommonMark processor | Corresponding HTML produced by a Djot processor |
---|---|---|
* fruits
* apple
* banana
|
<ul>
<li>fruits
<ul>
<li>apple</li>
<li>banana</li>
</ul>
</li>
</ul>
|
<ul>
<li>fruits
* apple
* banana
</li>
</ul>
|
* fruits
* apple
* banana
|
<ul>
<li><p>fruits</p>
<ul>
<li>apple</li>
<li>banana</li>
</ul>
</li>
</ul>
|
<ul>
<li>fruits
<ul>
<li>apple</li>
<li>banana</li>
</ul>
</li>
</ul>
|
Djot has no setext (=
or -
) headings, only ATX (#
) headings.
Example:
Text using CommonMark syntax | Text using Djot syntax | Corresponding HTML produced |
---|---|---|
Heading
=======
Sub-heading
-----------
|
# Heading
## Sub-heading
|
<h1>Heading</h1>
<h2>Sub-heading</h2>
|
CommonMark uses single *
or _
for emphasis, and double *
or _
for strong emphasis. Djot uses single _
for emphasis, and single *
for strong emphasis.
Example:
Text using CommonMark syntax | Text using Djot syntax | Corresponding HTML produced |
---|---|---|
Text attributes _italic_, **bold**.
|
Text attributes _italic_, *bold*.
|
<p>Text attributes <em>italic</em>, <strong>bold</strong>.</p>
|
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:
Text using CommonMark syntax | Text using Djot syntax | Corresponding HTML produced |
---|---|---|
A (http://example.com "title").
|
A (http://example.com){title="title"}.
|
<p>A <a href="http://example.com" title="title">link</a>.</p>
|
Text using Djot syntax | Corresponding HTML produced by a Djot processor | Text viewed in a browser |
---|---|---|
# Heading
## Sub-heading
Paragraphs are separated
by a blank line.
The backslash at the end of a line\
produces a line break.
|
<h1>Heading</h1>
<h2>Sub-heading</h2>
<p>Paragraphs are separated
by a blank line.</p>
<p>The backslash at the end of a line<br>
produces a line break.</p>
|
Paragraphs are separated by a blank line. The backslash at the end of a line |
Text attributes _italic_, *bold*, `monospace`.
Horizontal rule:
* * *
|
<p>Text attributes <em>italic</em>, <strong>bold</strong>, <code>monospace</code>.</p>
<p>Horizontal rule:</p>
<hr>
|
Text attributes italic, bold, monospace .
Horizontal rule: |
Bullet lists nested within a numbered list:
1. fruits
* apple
* banana
2. vegetables
- carrot
- broccoli
|
<p>Bullet lists nested within a numbered list:</p>
<ol>
<li>fruits
<ul>
<li>apple</li>
<li>banana</li>
</ul>
</li>
<li>vegetables
<ul>
<li>carrot</li>
<li>broccoli</li>
</ul>
</li>
</ol>
|
Bullet lists nested within a numbered list:
|
A (http://example.com).
!(Icon-pictures.png){title="icon"}
> Djot uses email-style
characters for blockquoting.
>
> Multiple paragraphs need to be prepended individually.
Raw content such as inline `<abbr title="Hypertext Markup Language">HTML</abbr>`{=html} tags must be explicitly marked.
|
<p>A <a href="http://example.com">link</a>.</p>
<p><img alt="Image" title="icon" src="Icon-pictures.png"></p>
<blockquote>
<p>Djot uses email-style characters for blockquoting.</p>
<p>Multiple paragraphs need to be prepended individually.</p>
</blockquote>
<p>Raw content such as inline <abbr title="Hypertext Markup Language">HTML</abbr> tags must be explicitly marked.</p>
|
A link.
Raw content such as inline HTML tags must be explicitly marked. |
Name | License | Language | Repository | Description |
---|---|---|---|---|
djot.js | MIT License | TypeScript | https://github.com/jgm/djot.js | This is a TypeScript rewrite of the original reference implementation. |
djot.lua | MIT License | Lua | https://github.com/jgm/djot.lua | The original reference implementation. |
Jotdown | MIT License | Rust | https://github.com/hellux/jotdown | Pull parser implemented as a Rust library |
Djota | BSD 3-clause license | Prolog | https://github.com/aarroyoc/djota | Implementation in Prolog |
djoths | MIT License | Haskell | https://github.com/jgm/djoths | Haskell library and command-line tool |
godjot | MIT License | Go | https://github.com/sivukhin/godjot | Implementation in Go |