DSMD

Coming soon.


Mikedown

Mikedown is a minimal, highly constrained subset of Markdown designed specifically for use in source code documentation comment blocks. It intentionally omits the majority of standard Markdown features in favour of a small, predictable surface area.

Block elements

Code blocks

A run of one or more lines each beginning with four or more spaces is treated as a code block. The four leading spaces are stripped from every line before the content is wrapped in <pre><code> tags and HTML-escaped. Internal whitespace and newlines are preserved exactly.

An optional :language keyword argument adds a class="language-LANG" attribute to the <code> tag, suitable for use with syntax-highlighting libraries.

    const x = 1;
    return x;

Renders as:

<pre><code>const x = 1;
return x;
</code></pre>

Lists

A line beginning with - (hyphen followed by a space) starts an unordered list item. Consecutive list items form a single <ul> element. A list is closed by a blank line or the start of another block element.

Continuation lines — non-blank lines with leading whitespace that immediately follow a list item — are folded into that item's text, allowing long list entries to be wrapped across multiple source lines.

Paragraphs

Any line that does not match another block-level pattern is accumulated into a paragraph buffer and flushed as a <p> element when a blank line or block-level element is encountered.

Inline elements

Inline code

Text enclosed in matching double backticks (``...``) is wrapped in a <code> tag. The content is HTML-escaped and whitespace-trimmed. Inline code fragments may appear inside list items and link text.

Links

Standard Markdown link syntax: [anchor text](url). The anchor text may contain plain text or inline code fragments. Both the text and URL are whitespace-trimmed.


gor-mode

gor-mode is a minimal, highly constrained subset of Org-mode designed specifically for use in source code documentation comment blocks. Like Mikedown it omits the vast majority of Org-mode features, retaining only those that are useful in short prose documentation.

Block elements

Headings

A line beginning with one or more asterisks followed by a space is a heading. The number of asterisks maps directly to the HTML heading level: one asterisk yields <h1>, two yield <h2>, and so on up to a maximum of <h6>. Inline rules are applied to the heading text.

* Top-level heading
** Second-level heading

Lists

A line beginning with - (hyphen followed by a space) starts an unordered list item. Consecutive list items form a single <ul> element. A list is closed by a blank line or a heading.

Continuation lines — non-blank lines with leading whitespace that immediately follow a list item — are folded into that item's text.

Paragraphs

Any line that does not match another block-level pattern is accumulated into a paragraph buffer and flushed as a <p> element when a blank line or block-level element is encountered.

Inline elements

Bold

Text wrapped in asterisks (*word*) is rendered as <strong>. The asterisks must not be adjacent to whitespace or another asterisk on the inside.

Italic

Text wrapped in forward slashes (/word/) is rendered as <em>. The opening slash must be preceded by whitespace, an opening bracket, or the start of the string; the closing slash must be followed by whitespace, a closing bracket, punctuation, or the end of the string. This prevents false matches in URLs and file paths.

Links

Org-mode double-bracket link syntax: [[url][label]]. Both the URL and the label are whitespace-trimmed and rendered as an HTML anchor tag.

© 2026 Michael Fogus