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/malformed-yaml/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": "silent",
      "warnings": [
        "frontmatter is not valid YAML, so no revision note is read: yaml: line 1: did not find expected ',' or ']'"
      ]
    },
    {
      "file": "v3.md",
      "action": "published",
      "number": 2
    }
  ],
  "revisions": [
    {
      "number": 2,
      "note": "Fixed the frontmatter.",
      "stats": {
        "words_added": 1,
        "words_removed": 0,
        "blocks_changed": 1
      },
      "excerpt": [
        {
          "op": "modify",
          "kind": "paragraph",
          "segments": [
            {
              "t": "eq",
              "s": "A calm page"
            },
            {
              "t": "ins",
              "s": ", edited"
            },
            {
              "t": "eq",
              "s": "."
            }
          ]
        }
      ]
    }
  ]
}