An editor has nominated this article for deletion. You are welcome to participate in the deletion discussion , which will decide whether or not to retain it. |
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]
Djot's syntax is similar to CommonMark's, but there are some differences. [8]
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 [link](http://example.com "title"). | A [link](http://example.com){title="title"}. | <p>A <ahref="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 [link](http://example.com). {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 <ahref="http://example.com">link</a>.</p><p><imgalt="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 <abbrtitle="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 |
PHP is a general-purpose scripting language geared towards web development. It was originally created by Danish-Canadian programmer Rasmus Lerdorf in 1993 and released in 1995. The PHP reference implementation is now produced by the PHP Group. PHP was originally an abbreviation of Personal Home Page, but it now stands for the recursive acronym PHP: Hypertext Preprocessor.
The Standard Generalized Markup Language is a standard for defining generalized markup languages for documents. ISO 8879 Annex A.1 states that generalized markup is "based on two postulates":
Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing arbitrary data. It defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. The World Wide Web Consortium's XML 1.0 Specification of 1998 and several other related specifications—all of them free open standards—define XML.
Bytecode is a form of instruction set designed for efficient execution by a software interpreter. Unlike human-readable source code, bytecodes are compact numeric codes, constants, and references that encode the result of compiler parsing and performing semantic analysis of things like type, scope, and nesting depths of program objects.
Syntax highlighting is a feature of text editors that is used for programming, scripting, or markup languages, such as HTML. The feature displays text, especially source code, in different colours and fonts according to the category of terms. This feature facilitates writing in a structured language such as a programming language or a markup language as both structures and syntax errors are visually distinct. This feature is also employed in many programming related contexts, either in the form of colorful books or online websites to make understanding code snippets easier for readers. Highlighting does not affect the meaning of the text itself; it is intended only for human readers.
YAML is a human-readable data serialization language. It is commonly used for configuration files and in applications where data are being stored or transmitted. YAML targets many of the same communications applications as Extensible Markup Language (XML) but has a minimal syntax that intentionally differs from Standard Generalized Markup Language (SGML). It uses Python-style indentation to indicate nesting and does not require quotes around most string values.
In computing, configuration files are files used to configure the parameters and initial settings for some computer programs or applications, server processes and operating system settings.
In computer-based language recognition, ANTLR, or ANother Tool for Language Recognition, is a parser generator that uses a LL(*) algorithm for parsing. ANTLR is the successor to the Purdue Compiler Construction Tool Set (PCCTS), first developed in 1989, and is under active development. Its maintainer is Professor Terence Parr of the University of San Francisco.
A lightweight markup language (LML), also termed a simple or humane markup language, is a markup language with simple, unobtrusive syntax. It is designed to be easy to write using any generic text editor and easy to read in its raw form. Lightweight markup languages are used in applications where it may be necessary to read the raw document as well as the final rendered output.
A source-code editor is a text editor program designed specifically for editing source code of computer programs. It may be a standalone application or it may be built into an integrated development environment (IDE).
IronPython is an implementation of the Python programming language targeting the .NET and Mono frameworks. The project is currently maintained by a group of volunteers at GitHub. It is free and open-source software, and can be implemented with Python Tools for Visual Studio, which is a free and open-source extension for Microsoft's Visual Studio IDE.
JSON is an open standard file format and data interchange format that uses human-readable text to store and transmit data objects consisting of attribute–value pairs and arrays. It is a commonly used data format with diverse uses in electronic data interchange, including that of web applications with servers.
An INI file is a configuration file for computer software that consists of plain text with a structure and syntax comprising key–value pairs organized in sections. The name of these configuration files comes from the filename extension INI, short for initialization, used in the MS-DOS operating system which popularized this method of software configuration. The format has become an informal standard in many contexts of configuration, but many applications on other operating systems use different file name extensions, such as conf and cfg.
FontForge is a FOSS font editor which supports many common font formats. Developed primarily by George Williams until 2012, FontForge is free software and is distributed under a mix of the GNU General Public License Version 3 and the 3-clause BSD license. It is available for operating systems including Linux, Windows, and macOS, and is localized into 12 languages.
Markdown is a lightweight markup language for creating formatted text using a plain-text editor. John Gruber created Markdown in 2004 as an easy-to-read markup language. Markdown is widely used for blogging and instant messaging, and also used elsewhere in online forums, collaborative software, documentation pages, and readme files.
JUCE is an open-source cross-platform C++ application framework, used for the development of desktop and mobile applications. JUCE is used in particular for its GUI and plug-ins libraries. It is dual licensed under the GPLv3 and a commercial license.
Google Closure Tools is a set of tools to help developers build rich web applications with JavaScript. It was developed by Google for use in their web applications such as Gmail, Google Docs and Google Maps. As of 2023, the project had over 230K LOCs not counting the embedded Mozilla Rhino compiler.
Julia is a high-level, general-purpose dynamic programming language, still designed to be fast and productive, for e.g. data science, artificial intelligence, machine learning, modeling and simulation, most commonly used for numerical analysis and computational science.
Pandoc is a free-software document converter, widely used as a writing tool and as a basis for publishing workflows. It was created by John MacFarlane, a philosophy professor at the University of California, Berkeley.
Iosevka is a monospace programming typeface, built declaratively using custom typeface generation software, and with an emphasis on compatibility with CJK characters. It is available under a FOSS license. The default builds are available in two styles of nine weights each, and come with italic and oblique versions. The typeface was designed to be easily configurable by editing textual TOML configuration files in the custom generation software.