acdc-parser 0.8.0

`AsciiDoc` parser using PEG grammars
Documentation
{
  "name": "document",
  "type": "block",
  "attributes": {
    "fn-test": "footnote:fn-test[https://example.com/path[Link text, with comma].]"
  },
  "blocks": [
    {
      "name": "paragraph",
      "type": "block",
      "inlines": [
        {
          "name": "text",
          "type": "string",
          "value": "Visit ",
          "location": [
            {
              "line": 1,
              "col": 1
            },
            {
              "line": 1,
              "col": 6
            }
          ]
        },
        {
          "name": "ref",
          "type": "inline",
          "variant": "link",
          "target": {
            "type": "url",
            "value": "https://example.com"
          },
          "location": [
            {
              "line": 1,
              "col": 7
            },
            {
              "line": 1,
              "col": 50
            }
          ],
          "attributes": {}
        },
        {
          "name": "text",
          "type": "string",
          "value": " for more information.",
          "location": [
            {
              "line": 1,
              "col": 51
            },
            {
              "line": 1,
              "col": 72
            }
          ]
        }
      ],
      "location": [
        {
          "line": 1,
          "col": 1
        },
        {
          "line": 1,
          "col": 72
        }
      ]
    },
    {
      "name": "paragraph",
      "type": "block",
      "inlines": [
        {
          "name": "text",
          "type": "string",
          "value": "This is a link with multiple commas: ",
          "location": [
            {
              "line": 3,
              "col": 1
            },
            {
              "line": 3,
              "col": 37
            }
          ]
        },
        {
          "name": "ref",
          "type": "inline",
          "variant": "link",
          "target": {
            "type": "url",
            "value": "https://reddit.com/about/"
          },
          "location": [
            {
              "line": 3,
              "col": 38
            },
            {
              "line": 3,
              "col": 117
            }
          ],
          "attributes": {}
        },
        {
          "name": "text",
          "type": "string",
          "value": ".",
          "location": [
            {
              "line": 3,
              "col": 118
            },
            {
              "line": 3,
              "col": 118
            }
          ]
        }
      ],
      "location": [
        {
          "line": 3,
          "col": 1
        },
        {
          "line": 3,
          "col": 118
        }
      ]
    },
    {
      "name": "paragraph",
      "type": "block",
      "inlines": [
        {
          "name": "text",
          "type": "string",
          "value": "Link with comma and attributes: ",
          "location": [
            {
              "line": 5,
              "col": 1
            },
            {
              "line": 5,
              "col": 32
            }
          ]
        },
        {
          "name": "ref",
          "type": "inline",
          "variant": "link",
          "target": {
            "type": "url",
            "value": "https://rust-lang.org"
          },
          "location": [
            {
              "line": 5,
              "col": 33
            },
            {
              "line": 5,
              "col": 101
            }
          ],
          "attributes": {
            "role": "external"
          }
        },
        {
          "name": "text",
          "type": "string",
          "value": ".",
          "location": [
            {
              "line": 5,
              "col": 102
            },
            {
              "line": 5,
              "col": 102
            }
          ]
        }
      ],
      "location": [
        {
          "line": 5,
          "col": 1
        },
        {
          "line": 5,
          "col": 102
        }
      ]
    },
    {
      "name": "fn-test",
      "type": "attribute",
      "value": "footnote:fn-test[https://example.com/path[Link text, with comma].]",
      "location": [
        {
          "line": 7,
          "col": 1
        },
        {
          "line": 7,
          "col": 77
        }
      ]
    },
    {
      "name": "paragraph",
      "type": "block",
      "inlines": [
        {
          "name": "text",
          "type": "string",
          "value": "Testing footnote attribute: ",
          "location": [
            {
              "line": 9,
              "col": 1
            },
            {
              "line": 9,
              "col": 28
            }
          ]
        },
        {
          "name": "footnote",
          "type": "inline",
          "id": "fn-test",
          "inlines": [
            {
              "name": "ref",
              "type": "inline",
              "variant": "link",
              "target": {
                "type": "url",
                "value": "https://example.com/path"
              },
              "location": [
                {
                  "line": 9,
                  "col": 29
                },
                {
                  "line": 9,
                  "col": 29
                }
              ],
              "attributes": {}
            },
            {
              "name": "text",
              "type": "string",
              "value": ".",
              "location": [
                {
                  "line": 9,
                  "col": 29
                },
                {
                  "line": 9,
                  "col": 29
                }
              ]
            }
          ],
          "location": [
            {
              "line": 9,
              "col": 29
            },
            {
              "line": 9,
              "col": 29
            }
          ]
        }
      ],
      "location": [
        {
          "line": 9,
          "col": 1
        },
        {
          "line": 9,
          "col": 37
        }
      ]
    }
  ],
  "location": [
    {
      "line": 1,
      "col": 1
    },
    {
      "line": 9,
      "col": 37
    }
  ]
}