35a - the parser reads the plain flavour and the lift goes
This commit is contained in:
@@ -118,16 +118,17 @@ Plain markdown is a second flavour of the same grammar. `adfToPlainMarkdown` wri
|
||||
tools render — GitHub, GitLab, Obsidian and the like — keeping the content and dropping the rest:
|
||||
attributes, colours, layout, identity. It refuses only
|
||||
`not-an-adf-document`, `unsupported-document-version` and `unsupported-nesting-depth`, and writes
|
||||
no directive. `plainMarkdownToAdf` reads through `markdownToAdf`, refusing what it refuses, and
|
||||
turns the conventions below back into nodes, taking other tools' spellings too. Markdown
|
||||
no directive. `plainMarkdownToAdf` reads what `markdownToAdf` reads, refusing what it refuses, and
|
||||
the conventions below as nodes, taking other tools' spellings too; a backslash keeps a marker text:
|
||||
`\==x==`, `> \[!NOTE]`, `- \[x]`. Markdown
|
||||
`adfToPlainMarkdown` wrote reads back and writes again byte for byte; the document it came from
|
||||
does not come back. To edit a document and save it back, use `adfToMarkdown` and `markdownToAdf`:
|
||||
saving what this pair read replaces mentions, attachments and macros with text.
|
||||
|
||||
| ADF | Written | Read back |
|
||||
| --- | --- | --- |
|
||||
| `panel` | a GitHub alert, `> [!WARNING]`: info `NOTE`, note `IMPORTANT`, tip and success `TIP`, warning `WARNING`, error `CAUTION`, custom `NOTE` | GitHub's five words, and Obsidian's: hint tip; success, check, done success; attention warning; danger, failure, fail, missing, bug, error error; any other word info — in any case |
|
||||
| `expand`, `nestedExpand` | Obsidian's folded callout, `> [!NOTE]- Title` | `-` or `+` after any word; an expand inside an expand is a `nestedExpand` |
|
||||
| `panel` | a GitHub alert, `> [!WARNING]`: info `NOTE`, note `IMPORTANT`, tip and success `TIP`, warning `WARNING`, error `CAUTION`, custom `NOTE` | GitHub's five words, and Obsidian's: hint tip; success, check, done success; attention warning; danger, failure, fail, missing, bug, error error; any other word info — in any case; the rest of the marker's line is the first paragraph |
|
||||
| `expand`, `nestedExpand` | Obsidian's folded callout, `> [!NOTE]- Title` | `-` or `+` after any word, the rest of the marker's line the title; an expand inside an expand is a `nestedExpand` |
|
||||
| `taskList` | `- [x] Done`, `- [ ] Todo` | a bullet list whose every item is so marked, `[X]` too |
|
||||
| `backgroundColor` | `==text==` | `==text==` bounded outside by whitespace, punctuation or a line edge, in the editor's default highlight |
|
||||
| `table` | a pipe table: the first row its header, a cell's blocks on one line, a span kept under its header by empty cells | — |
|
||||
@@ -144,8 +145,9 @@ saving what this pair read replaces mentions, attachments and macros with text.
|
||||
`_(link card not included)_`, `_(extension not included)_`.
|
||||
- `code`, `em`, `link`, `strike` and `strong` stay; every other mark drops, keeping its text, and
|
||||
so does a mark CommonMark cannot spell where it stands.
|
||||
- A newline in text is a hard break, edge whitespace outside a link or code span is trimmed,
|
||||
carriage returns and null characters are removed, and an empty paragraph drops.
|
||||
- A newline in text is a hard break and in an expand's title a space, edge whitespace outside a
|
||||
link or code span is trimmed, carriage returns and null characters are removed, and an empty
|
||||
paragraph drops.
|
||||
- An ordered list numbered past `999999999`, or adjacent ordered lists whose numbering does not
|
||||
continue, is one bullet list keeping its numbers as text.
|
||||
- A node read back carries no `localId`, which Atlassian's schema requires on `taskList`,
|
||||
|
||||
Reference in New Issue
Block a user