3
0
mirror of https://github.com/larvit/adf-codec.git synced 2026-11-21 23:46:21 +01:00

Write tables, images, cards, extensions and expand titles in adfToPlainText

This commit is contained in:
2026-11-14 21:30:11 +01:00
committed by Lillem4n
parent d1749313b4
commit 0507a49579
7 changed files with 220 additions and 41 deletions
+4 -2
View File
@@ -5,8 +5,10 @@
- `adfToPlainText` writes a document as text with no markup, for a search index, a notification or an
email: blocks a blank line apart; `• ` and `1.` list markers, `☑ ` and `☐ ` for a done and an open
task, nesting indented; a link's address and title in parentheses after its text; a hard break as a
line feed; and a mention, emoji, date or status as the text it shows. It refuses what `adfToHtml`
refuses. A table is written as its cells, as blocks, for now.
line feed; a mention, emoji, date or status as the text it shows; a table as a line per row, its
cells apart by ` | `; an image as its alt text and address, `[image]` with neither; a card as its
address; an extension's text; and an expand's title above its body. It refuses what `adfToHtml`
refuses.
- `readAdfDocument` and the four writers name the node `not-an-adf-document` refuses: `path` leads
to a node that is not an ADF node, and the message says what is wrong with it, such as which
attribute holds a value that is not JSON. A getter, an object holding itself, a throwing Proxy