code.pablomurad.com

patchwork

Publishes the revisions of your pages as a feed, with notes and readable diffs, written in Go

internal/engine/testdata/cases/list-item-insert/expected.json raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{
  "steps": [
    {
      "file": "v1.md",
      "action": "baseline",
      "number": 1
    },
    {
      "file": "v2.md",
      "action": "published",
      "number": 2
    }
  ],
  "revisions": [
    {
      "number": 2,
      "note": "Added the thermos.",
      "kind": "expansion",
      "stats": {
        "words_added": 4,
        "words_removed": 0,
        "blocks_changed": 1
      },
      "excerpt": [
        {
          "op": "gap",
          "count": 2
        },
        {
          "op": "eq",
          "kind": "list_item",
          "text": "a notebook"
        },
        {
          "op": "insert",
          "kind": "list_item",
          "text": "a thermos of coffee"
        },
        {
          "op": "eq",
          "kind": "list_item",
          "text": "patience"
        }
      ]
    }
  ]
}