Notenik
For People Who Like Text

Markdown Support

Notenik offers extensive support for Markdown, John Gruber's text-to-HTML conversion tool for web writers.

If you're new to Markdown, and would like to read about some of its advantages, feel free to consult my blog post titled Why I Use Markdown (And Why You Should Too).

Within Notenik the body of each Note can be formatted using Markdown, but so can any other field declared to be of the type longtext.

Conversion to HTML will be done when displaying a Note, but can also be invoked when sharing a Note, or when generating HTML through Notenik's templating engine.

Thanks to the generosity of other open-source developers, Notenik gives you a choice of Markdown parsers to use. Visit the app preferences to change your choice of parser.

  • Down - Blazing fast Markdown rendering in Swift, built upon cmark, which is in turn based on the CommonMark spec.

  • Ink - A fast and flexible Markdown parser written in Swift.

  • Mkdown - Notenik's own Markdown parser, allowing wiki-style inter-note linking within Notenik.

Feel free to follow the links above to consult the documentation for Down and/or Ink.

The rest of this article will describe Notenik's own parser.

The Notenik Parser

The Notenik parser generally adheres closely to the Markdown and SmartyPants specs from John Gruber.

Following are the intended changes/additions found within the Notenik parser.

The Notenik Markdown parser supports double-bracket wiki-style links as an extension to the original Markdown spec from John Gruber.

Simply enclose the name of another note within double brackets, like this – [[Overview]] – and a click on the resulting link will take you to that note.

Heading auto-numbering

As an extension to the original Markdown spec from John Gruber, headings may be auto-numbered in a fashion similar to the usual numbering of ordered items.

Heading ID Generation

As an extension to the original Markdown spec from John Gruber, headings will automatically have IDs assigned, based on the contents between the opening and closing tags, so that they can become targets for links.

Table of Contents Generation

As an extension to the original Markdown spec from John Gruber, a Table of Contents may be generated by placing the literal [toc] on a line by itself. The resulting table will contain all of the headings found in the Markdown following the [toc] line itself.

Footnotes

As an extension to the original Markdown spec from John Gruber, footnotes may be created using the sort of syntax documented for MultiMarkdown or the Markdown Extended Syntax.

Citations

As an extension to the original Markdown spec from John Gruber, citations are supported using the MultiMarkdown syntax.

Fenced Code Blocks

As an extension to the original Markdown spec from John Gruber, fenced code blocks are supported.

This is an extension documented in the Markdown Guide, but the Notenik parser is actually coded to conform to the Python Markdown spec.

A code fence will consist of a line consisting of only a repeated number of special characters.

The character used may be either a backtick (`) or a tilde (~).

The character must be repeated three or more times.

The ending code fence must contain the same number of repetitions as the line that started the code block, using the same special character.

Email Obfuscation

Automatic links for email addresses do not perform any randomized decimal and hex entity-encoding of the email addresses.

Backticks Style quotes

Backticks-style quotes are not converted to curly quotes.

Back to the Articles Index

Follow

Share