Markdown in Hjarni
Exactly what a note's body can hold, and how it shows. Useful when you write notes by hand, import them, or have Claude, ChatGPT or a script write them over MCP or the API. The note editor, the note page, public links and the ChatGPT panel all read it the same way.
The short version
Hjarni reads CommonMark with GitHub's tables, strikethrough and autolinks, the same flavour as GitHub and most Markdown apps. On top of that come three things of its own:
[[42:Note title]]links to another note.shows a file attached to the note.sets an image's width, as Obsidian does.
One difference from plain CommonMark: a single line break is kept. Two lines typed one under the other show one under the other, without a blank line between them.
Text
A blank line starts a new paragraph. A single line break stays a line break.
# to ######, a space, then the text. Headings get no anchor links.
**bold**, *italic* or _italic_. An underscore inside a word, as in snake_case_name, stays an underscore.
Two tildes: ~~gone~~. A single tilde is just a tilde, so H~2~O stays as typed.
`like this`. Nothing inside code is a link, an image or formatting.
> at the start of a line. Quotes can hold lists, tasks and code.
--- on a line of its own, with a blank line above it. Directly under a line of text, --- turns that line into a heading instead, as in all CommonMark.
Lists and tasks
Bullet lists start with - , * or + ; numbered lists with 1. or 1) . Indent an item to nest it under the one above.
A task is a list item that starts with a box: - [ ] To do, ticked as - [x] Done (a capital X works too). Numbered tasks (1. [ ] Step) and tasks inside a quote work as well. On the note page a task's box can be ticked with a click, which writes the x into the note.
- [x] Book the hut
- [ ] Pack the stove
- [ ] Two gas cans
1. [ ] Check the forecast
Links
Web links. [the guide](https://example.com). A bare https:// or www. address becomes a link by itself. Links to other sites open in a new tab.
Note links. [[42:Note title]] links to the note with id 42. The id decides where it goes; the title is only what it shows, and Hjarni keeps it up to date when the note is renamed. A link to a note you cannot see, or one that no longer exists, shows as the plain text you wrote.
The older [[Note title]] still works, matched by title without regard to case, but it breaks when the note is renamed. [[id:42:Note title]] is read as [[42:Note title]]. On a public link, only notes inside the shared folder stay links. More in wiki-links between notes.
Images
Attached images.  shows a file attached to this note, named by its filename with spaces and other special characters URL-encoded. The note holds the name, never a download link, so it keeps working and leaks nothing when the note is read over MCP or exported. A name that matches no file on the note shows as its alt text in brackets.
Width. Put the width in pixels after a bar at the end of the alt text: . Between 16 and 9999, with no space around the bar, so alt text like Q3 | 2024 stays text. An image is never drawn wider than the page.
Images from the web.  works too, loaded from that site. Any image can be clicked to see it larger. See file attachments for what you can attach.
Tables and code
Tables are GitHub's: a header row, a line of dashes, then rows. Alignment colons in the dash line are accepted but ignored: every column is left-aligned. A table wider than the screen scrolls sideways on its own.
| Day | Route | Hours |
| --- | ------------------ | ----: |
| Sat | Lautaret to Refuge | 4 |
Code blocks are fenced with three backticks or tildes, or indented four spaces. A language after the fence (```ruby) is kept in the Markdown, but code is shown without syntax colours. Every code block on the note page has a Copy button.
HTML
Simple HTML in a note is shown: <sub>, <sup>, <kbd>, <mark>, <br>, <small>, <abbr>, definition lists and the like, along with the tags Markdown itself makes.
Any other tag is dropped when the note is shown: scripts and styles never run, and iframes, forms, embeds and <details> are not drawn. Text written between such tags still shows, as plain text. Attributes such as style and onclick are dropped too. The note itself keeps what you wrote; only the page leaves those parts out.
Not supported
These are common in other apps but are not drawn in Hjarni. They stay in your note as text, so nothing is lost if you move the note somewhere that does draw them:
- Footnotes (
[^1]). - Math (
$x^2$,$$...$$). - Diagrams such as Mermaid. A
```mermaidblock shows as code. - Callouts (
> [!NOTE]). They show as an ordinary quote. - Heading anchors and a generated table of contents.
- Emoji shortcodes (
:smile:). Type or paste the emoji itself. - Inline tags (
#ideain the text). Tags live on the note, not in its body; see containers and tags. - Front matter. A note's title, summary, source URL and tags are fields of their own, not YAML at the top of the body.
For AI assistants and scripts
Claude, ChatGPT and anything using the REST API write a note's body as this Markdown. A few habits keep notes clean:
- The title is a field of its own, so the body need not repeat it as a
#heading. - Link notes as
[[id:Title]]with the real numeric id, from a search or a note read first. - Show an attached image with
attachment:and its filename, never a download URL. Download links expire, and one in the body would hand access to anyone who reads the note. - Use
- [ ]for to-dos, so they can be ticked on the page. - Leave single line breaks where you mean them: they show as typed.
The same Markdown comes back out when you export, and it opens in Obsidian and other Markdown apps as it is.
Common questions
FAQ
Which Markdown flavour does Hjarni use?
CommonMark with GitHub's tables, strikethrough and autolinks, the same flavour as GitHub. On top come note links ([[42:Title]]), attached images (attachment:) and image widths (). A single line break is kept, unlike plain CommonMark.
Will my Obsidian notes look the same?
Mostly. Headings, lists, tasks, tables, links, code and images look the same, and wiki-links and the |300 image width are written the way Obsidian writes them. Callouts, footnotes, math and Mermaid diagrams are not drawn; they stay in the note as text, so nothing is lost.
Is anything in my note changed when it is saved?
No. The body is stored as written. The one thing Hjarni updates is the title inside a [[42:Title]] link, kept in step when that note is renamed. What is not supported, such as footnotes or unsafe HTML, is only left out when the note is shown, never removed from the note.
Why doesn't my footnote or formula render?
Footnotes, math and diagrams are not supported yet. If you need one of them, email evert@hjarni.com: requests decide what comes next.
Related docs
Something renders differently than you expected?
Email evert@hjarni.com
Give your AI a memory. Free.
Connect Claude or ChatGPT to notes they can actually read and write.
Give your AI a memory. Free.