3
0
mirror of https://github.com/larvit/adf-codec.git synced 2026-11-13 12:18:28 +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:
2026-10-09 02:51:06 +02:00
parent 649ffd3d69
commit 0fd2b3705c
2 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ Each call names the markdown it reads or writes:
| --- | --- |
| `adfToMarkdown` | `adfToLosslessMarkdown` |
| `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
an error, turning each directive into text and each carried node into an `adf` code block. Before
+6 -6
View File
@@ -10,10 +10,10 @@ products store as ADF.
- **Lossless:** `adfToLosslessMarkdown` and `losslessMarkdownToAdf` give back the document they
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
and `~~` included; `commonMarkToAdf` reads markdown known to be strict CommonMark as its spec
says, nothing in it becoming a table, task or panel. Both apart from raw HTML and the exceptions
[The guarantees](#the-guarantees) lists.
- **Markdown in:** `portableMarkdownToAdf` reads a bot's or a model's markdown, `~~` and pipe tables
whose every row opens with a pipe included; `commonMarkToAdf` reads markdown known to be strict
CommonMark as its spec says, nothing in it becoming a table, task or panel. Both apart from raw
HTML and the exceptions [The guarantees](#the-guarantees) lists.
- **Portable markdown, lossy:** `adfToPortableMarkdown` and `portableMarkdownToAdf` convert to and
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.
@@ -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`;
`portableMarkdownToAdf` those and `malformed-pipe-table`; `losslessMarkdownToAdf` every row; and
`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
after next:
`unsupported-nesting-depth`, and `losslessMarkdownToAdf` `unsupported-node-shape`, from the
"Either direction" table:
| Code | Fires when | What you can do |
| --- | --- | --- |