A | B | C | D | E | F | G | H | CH | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
Filename extension |
.dj[1] |
---|---|
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.[3] It was created in 2022 by John MacFarlane, the author of Pandoc and a member of the CommonMark standardization group.[4][5]
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:
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>
|
Headings
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>
|
Emphasis
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>
|
Links
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>
|
Examples
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. |
Implementations
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 |
Uses
References
- ^ "File extension". github.com. Retrieved 2023-01-24.
- ^ "Release 0.2.0". 3 January 2023. Retrieved 8 January 2023.
- ^ a b "Djot (/dʒɑt/)". djot.net. Retrieved 2022-08-13.
- ^ MacFarlane, John (2022-07-11). "Initial commit". github.com. Retrieved 2022-08-13.
- ^ MacFarlane, John. "Tools". johnmacfarlane.net. Retrieved 2022-08-13.
- ^ "README.md". github.com. Retrieved 2023-01-24.
- ^ "License". github.com. Retrieved 2022-08-13.
- ^ "Quick Start for Markdown users". github.com. Retrieved 2022-08-14.
- ^ "pandoc 3.1.12 (2024-02-14)". pandoc.org. Retrieved 2024-03-05.
External links
Text je dostupný za podmienok Creative Commons Attribution/Share-Alike License 3.0 Unported; prípadne za ďalších podmienok. Podrobnejšie informácie nájdete na stránke Podmienky použitia.
Antropológia
Aplikované vedy
Bibliometria
Dejiny vedy
Encyklopédie
Filozofia vedy
Forenzné vedy
Humanitné vedy
Knižničná veda
Kryogenika
Kryptológia
Kulturológia
Literárna veda
Medzidisciplinárne oblasti
Metódy kvantitatívnej analýzy
Metavedy
Metodika
Text je dostupný za podmienok Creative
Commons Attribution/Share-Alike License 3.0 Unported; prípadne za ďalších
podmienok.
Podrobnejšie informácie nájdete na stránke Podmienky
použitia.
www.astronomia.sk | www.biologia.sk | www.botanika.sk | www.dejiny.sk | www.economy.sk | www.elektrotechnika.sk | www.estetika.sk | www.farmakologia.sk | www.filozofia.sk | Fyzika | www.futurologia.sk | www.genetika.sk | www.chemia.sk | www.lingvistika.sk | www.politologia.sk | www.psychologia.sk | www.sexuologia.sk | www.sociologia.sk | www.veda.sk I www.zoologia.sk