mirror of
https://github.com/larvit/adf-codec.git
synced 2026-11-20 23:25:43 +01:00
Answer product-owner round 2: the bullet names the pipe tables the reader takes, the migration row links its section, the codes name their table
This commit is contained in:
+1
-1
@@ -8,7 +8,7 @@ Each call names the markdown it reads or writes:
|
|||||||
| --- | --- |
|
| --- | --- |
|
||||||
| `adfToMarkdown` | `adfToLosslessMarkdown` |
|
| `adfToMarkdown` | `adfToLosslessMarkdown` |
|
||||||
| `markdownToAdf`, for markdown `adfToMarkdown` wrote, edited since or not | `losslessMarkdownToAdf` |
|
| `markdownToAdf`, for markdown `adfToMarkdown` wrote, edited since or not | `losslessMarkdownToAdf` |
|
||||||
| `markdownToAdf`, for markdown no `adfToMarkdown` output went into | `portableMarkdownToAdf`, which keeps GFM's pipe tables and `~~` and reads alerts, callouts, task markers and `==` as nodes (README §Portable markdown); or `commonMarkToAdf`, which reads all of them, a directive and an `adf:` fence as CommonMark does, as text and code |
|
| `markdownToAdf`, for markdown no `adfToMarkdown` output went into | `portableMarkdownToAdf`, which keeps GFM's pipe tables and `~~` and reads alerts, callouts, task markers and `==` as nodes ([Portable markdown](README.md#portable-markdown)); or `commonMarkToAdf`, which reads all of them, a directive and an `adf:` fence as CommonMark does, as text and code |
|
||||||
|
|
||||||
Directives moved under the `!adf:` prefix. `losslessMarkdownToAdf` reads `0.1.0`'s spelling without
|
Directives moved under the `!adf:` prefix. `losslessMarkdownToAdf` reads `0.1.0`'s spelling without
|
||||||
an error, turning each directive into text and each carried node into an `adf` code block. Before
|
an error, turning each directive into text and each carried node into an `adf` code block. Before
|
||||||
|
|||||||
@@ -10,10 +10,10 @@ products store as ADF.
|
|||||||
|
|
||||||
- **Lossless:** `adfToLosslessMarkdown` and `losslessMarkdownToAdf` give back the document they
|
- **Lossless:** `adfToLosslessMarkdown` and `losslessMarkdownToAdf` give back the document they
|
||||||
started from — panels, mentions, statuses and node types this version does not know included.
|
started from — panels, mentions, statuses and node types this version does not know included.
|
||||||
- **Markdown in:** `portableMarkdownToAdf` reads a bot's or a model's markdown, GFM's pipe tables
|
- **Markdown in:** `portableMarkdownToAdf` reads a bot's or a model's markdown, `~~` and pipe tables
|
||||||
and `~~` included; `commonMarkToAdf` reads markdown known to be strict CommonMark as its spec
|
whose every row opens with a pipe included; `commonMarkToAdf` reads markdown known to be strict
|
||||||
says, nothing in it becoming a table, task or panel. Both apart from raw HTML and the exceptions
|
CommonMark as its spec says, nothing in it becoming a table, task or panel. Both apart from raw
|
||||||
[The guarantees](#the-guarantees) lists.
|
HTML and the exceptions [The guarantees](#the-guarantees) lists.
|
||||||
- **Portable markdown, lossy:** `adfToPortableMarkdown` and `portableMarkdownToAdf` convert to and
|
- **Portable markdown, lossy:** `adfToPortableMarkdown` and `portableMarkdownToAdf` convert to and
|
||||||
from the markdown that GitHub, GitLab and Obsidian render — GitHub Flavored Markdown's alerts,
|
from the markdown that GitHub, GitLab and Obsidian render — GitHub Flavored Markdown's alerts,
|
||||||
task lists and pipe tables, Obsidian Flavored Markdown's callouts and highlights.
|
task lists and pipe tables, Obsidian Flavored Markdown's callouts and highlights.
|
||||||
@@ -187,8 +187,8 @@ minor may narrow that, never widen it. For `not-a-string` it is `{ line: 1, offs
|
|||||||
Parsing — `commonMarkToAdf` raises `not-a-string`, `unmappable-html` and `unmappable-image`;
|
Parsing — `commonMarkToAdf` raises `not-a-string`, `unmappable-html` and `unmappable-image`;
|
||||||
`portableMarkdownToAdf` those and `malformed-pipe-table`; `losslessMarkdownToAdf` every row; and
|
`portableMarkdownToAdf` those and `malformed-pipe-table`; `losslessMarkdownToAdf` every row; and
|
||||||
`htmlToAdf`, at `0.3.0`, the rows its dialect reaches. Every reader also raises
|
`htmlToAdf`, at `0.3.0`, the rows its dialect reaches. Every reader also raises
|
||||||
`unsupported-nesting-depth`, and `losslessMarkdownToAdf` `unsupported-node-shape`, from the table
|
`unsupported-nesting-depth`, and `losslessMarkdownToAdf` `unsupported-node-shape`, from the
|
||||||
after next:
|
"Either direction" table:
|
||||||
|
|
||||||
| Code | Fires when | What you can do |
|
| Code | Fires when | What you can do |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
|
|||||||
Reference in New Issue
Block a user