oficina / mapa Public

Clone
git clone https://amadan.net/oficina/mapa

Plain git — no account needed to clone.

Download

Download this file

1package notionmd
2
3// literalFixtures are §11.4's table, row by row, with the seams where
4// literal text meets generated syntax and readings across runs.
5func literalFixtures() []fixture {
6 return append(lineStartFixtures(), inlineLiteralFixtures()...)
7}
8
9func lineStartFixtures() []fixture {
10 starts := []string{"```js fence", "~~~ fence", "# not a heading",
11 "- not an item", "* not an item", "+ not an item", "1. not an item",
12 "1) not an item", "> not a quote", "---", "***", "___",
13 " - indented"}
14 var first, later []Block
15 for _, text := range starts {
16 first = append(first, para(txt(text)))
17 later = append(later, para(txt("line one\n"+text)))
18 }
19 return []fixture{
20 page("literal-line-starts", first...),
21 page("literal-continuation-starts", later...),
22 page("literal-heading-hash", blk("heading_2", txt("#hashtag"))),
23 page("literal-item-continuation", with(blk("bulleted_list_item",
24 txt("item")), para(txt("- looks like an item")))),
25 page("literal-task-boxes", blk("bulleted_list_item",
26 txt("[ ]\tnot a task")), blk("numbered_list_item",
27 txt("[x] not done either")), todo(false,
28 txt("[ ] inside a task"))),
29 page("literal-marker", para(txt("ends with a marker ^word")),
30 blk("bulleted_list_item", txt("an item ^solo")),
31 blk("quote", txt("quoted ^tail"))),
32 }
33}
34
35func inlineLiteralFixtures() []fixture {
36 acme := hexID("a")
37 return []fixture{
38 page("literal-wiki", para(txt("[[Acme]] and ![[app:item]]")),
39 para(bold("[[Acme"), txt("]] across runs"))),
40 page("literal-backticks", para(txt("a `b "),
41 mention("page", acme, "Acme"), txt(" c` d")),
42 para(txt("two `` ticks"))).live(acme, "Acme"),
43 page("literal-seams", para(txt("wow!"),
44 mention("page", acme, "Acme")),
45 para(txt("open ["), linked("site", "https://example.com"),
46 txt(" and later ]]")),
47 para(txt("!"), dated("2026-11-12", "", "")),
48 para(txt("a [draft, see "), linked("docs",
49 "https://example.com/d"))).live(acme, "Acme"),
50 page("literal-web-links", para(txt("[label](https://example.com)")),
51 para(txt("[mail](mailto:ana@example.com)")),
52 para(txt("![alt](/i/abc123)")),
53 para(txt("[not a link](relative/path)"))),
54 page("literal-left-alone", para(txt("see https://example.com/x")),
55 para(txt("*a* stays emphasis"))),
56 page("literal-in-a-cell", tableOf(false,
57 []string{"[[x]]", "`code`"})),
58 page("literal-in-a-label", para(linked("a `tick`",
59 "https://example.com/t"))),
60 }
61}
62