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/code-fence-edit/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
48
49
50
51
52
{
  "steps": [
    {
      "file": "v1.md",
      "action": "baseline",
      "number": 1
    },
    {
      "file": "v2.md",
      "action": "published",
      "number": 2
    }
  ],
  "revisions": [
    {
      "number": 2,
      "note": "The watcher needs the config flag.",
      "kind": "correction",
      "stats": {
        "words_added": 4,
        "words_removed": 0,
        "blocks_changed": 1
      },
      "excerpt": [
        {
          "op": "eq",
          "kind": "paragraph",
          "text": "Run the watcher:"
        },
        {
          "op": "modify",
          "kind": "code",
          "segments": [
            {
              "t": "eq",
              "s": "patchwork watch"
            },
            {
              "t": "ins",
              "s": " --config site/patchwork.yaml"
            }
          ]
        },
        {
          "op": "eq",
          "kind": "paragraph",
          "text": "That is all."
        }
      ]
    }
  ]
}