diff --git a/.ast_cache/test_frontmatter.md.ast.json b/.ast_cache/test_frontmatter.md.ast.json new file mode 100644 index 00000000..a773e01e --- /dev/null +++ b/.ast_cache/test_frontmatter.md.ast.json @@ -0,0 +1,231 @@ +[ + { + "type": "hr", + "tag": "hr", + "attrs": {}, + "map": [ + 0, + 1 + ], + "nesting": 0, + "level": 0, + "content": "", + "markup": "----", + "info": "", + "meta": {}, + "block": true, + "hidden": false + }, + { + "type": "heading_open", + "tag": "h2", + "attrs": {}, + "map": [ + 1, + 4 + ], + "nesting": 1, + "level": 0, + "content": "", + "markup": "-", + "info": "", + "meta": {}, + "block": true, + "hidden": false + }, + { + "type": "inline", + "tag": "", + "attrs": {}, + "map": [ + 1, + 3 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "text", + "tag": "", + "attrs": {}, + "nesting": 0, + "level": 0, + "content": "title: Test Document", + "markup": "", + "info": "", + "meta": {}, + "block": false, + "hidden": false + }, + { + "type": "softbreak", + "tag": "br", + "attrs": {}, + "nesting": 0, + "level": 0, + "content": "", + "markup": "", + "info": "", + "meta": {}, + "block": false, + "hidden": false + }, + { + "type": "text", + "tag": "", + "attrs": {}, + "nesting": 0, + "level": 0, + "content": "status: draft", + "markup": "", + "info": "", + "meta": {}, + "block": false, + "hidden": false + } + ], + "content": "title: Test Document\nstatus: draft", + "markup": "", + "info": "", + "meta": {}, + "block": true, + "hidden": false + }, + { + "type": "heading_close", + "tag": "h2", + "attrs": {}, + "nesting": -1, + "level": 0, + "content": "", + "markup": "-", + "info": "", + "meta": {}, + "block": true, + "hidden": false + }, + { + "type": "heading_open", + "tag": "h1", + "attrs": {}, + "map": [ + 5, + 6 + ], + "nesting": 1, + "level": 0, + "content": "", + "markup": "#", + "info": "", + "meta": {}, + "block": true, + "hidden": false + }, + { + "type": "inline", + "tag": "", + "attrs": {}, + "map": [ + 5, + 6 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "text", + "tag": "", + "attrs": {}, + "nesting": 0, + "level": 0, + "content": "Test with Front Matter", + "markup": "", + "info": "", + "meta": {}, + "block": false, + "hidden": false + } + ], + "content": "Test with Front Matter", + "markup": "", + "info": "", + "meta": {}, + "block": true, + "hidden": false + }, + { + "type": "heading_close", + "tag": "h1", + "attrs": {}, + "nesting": -1, + "level": 0, + "content": "", + "markup": "#", + "info": "", + "meta": {}, + "block": true, + "hidden": false + }, + { + "type": "paragraph_open", + "tag": "p", + "attrs": {}, + "map": [ + 7, + 8 + ], + "nesting": 1, + "level": 0, + "content": "", + "markup": "", + "info": "", + "meta": {}, + "block": true, + "hidden": false + }, + { + "type": "inline", + "tag": "", + "attrs": {}, + "map": [ + 7, + 8 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "text", + "tag": "", + "attrs": {}, + "nesting": 0, + "level": 0, + "content": "This document has YAML front matter.", + "markup": "", + "info": "", + "meta": {}, + "block": false, + "hidden": false + } + ], + "content": "This document has YAML front matter.", + "markup": "", + "info": "", + "meta": {}, + "block": true, + "hidden": false + }, + { + "type": "paragraph_close", + "tag": "p", + "attrs": {}, + "nesting": -1, + "level": 0, + "content": "", + "markup": "", + "info": "", + "meta": {}, + "block": true, + "hidden": false + } +] \ No newline at end of file diff --git a/.ast_cache/test_roundtrip.md.ast.json b/.ast_cache/test_roundtrip.md.ast.json new file mode 100644 index 00000000..061e435b --- /dev/null +++ b/.ast_cache/test_roundtrip.md.ast.json @@ -0,0 +1,580 @@ +[ + { + "type": "heading_open", + "tag": "h1", + "attrs": {}, + "map": [ + 0, + 1 + ], + "nesting": 1, + "level": 0, + "content": "", + "markup": "#", + "info": "", + "meta": {}, + "block": true, + "hidden": false + }, + { + "type": "inline", + "tag": "", + "attrs": {}, + "map": [ + 0, + 1 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "text", + "tag": "", + "attrs": {}, + "nesting": 0, + "level": 0, + "content": "Test Document", + "markup": "", + "info": "", + "meta": {}, + "block": false, + "hidden": false + } + ], + "content": "Test Document", + "markup": "", + "info": "", + "meta": {}, + "block": true, + "hidden": false + }, + { + "type": "heading_close", + "tag": "h1", + "attrs": {}, + "nesting": -1, + "level": 0, + "content": "", + "markup": "#", + "info": "", + "meta": {}, + "block": true, + "hidden": false + }, + { + "type": "paragraph_open", + "tag": "p", + "attrs": {}, + "map": [ + 2, + 3 + ], + "nesting": 1, + "level": 0, + "content": "", + "markup": "", + "info": "", + "meta": {}, + "block": true, + "hidden": false + }, + { + "type": "inline", + "tag": "", + "attrs": {}, + "map": [ + 2, + 3 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "text", + "tag": "", + "attrs": {}, + "nesting": 0, + "level": 0, + "content": "This is a test file for roundtrip validation.", + "markup": "", + "info": "", + "meta": {}, + "block": false, + "hidden": false + } + ], + "content": "This is a test file for roundtrip validation.", + "markup": "", + "info": "", + "meta": {}, + "block": true, + "hidden": false + }, + { + "type": "paragraph_close", + "tag": "p", + "attrs": {}, + "nesting": -1, + "level": 0, + "content": "", + "markup": "", + "info": "", + "meta": {}, + "block": true, + "hidden": false + }, + { + "type": "heading_open", + "tag": "h2", + "attrs": {}, + "map": [ + 4, + 5 + ], + "nesting": 1, + "level": 0, + "content": "", + "markup": "##", + "info": "", + "meta": {}, + "block": true, + "hidden": false + }, + { + "type": "inline", + "tag": "", + "attrs": {}, + "map": [ + 4, + 5 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "text", + "tag": "", + "attrs": {}, + "nesting": 0, + "level": 0, + "content": "Section 1", + "markup": "", + "info": "", + "meta": {}, + "block": false, + "hidden": false + } + ], + "content": "Section 1", + "markup": "", + "info": "", + "meta": {}, + "block": true, + "hidden": false + }, + { + "type": "heading_close", + "tag": "h2", + "attrs": {}, + "nesting": -1, + "level": 0, + "content": "", + "markup": "##", + "info": "", + "meta": {}, + "block": true, + "hidden": false + }, + { + "type": "paragraph_open", + "tag": "p", + "attrs": {}, + "map": [ + 5, + 6 + ], + "nesting": 1, + "level": 0, + "content": "", + "markup": "", + "info": "", + "meta": {}, + "block": true, + "hidden": false + }, + { + "type": "inline", + "tag": "", + "attrs": {}, + "map": [ + 5, + 6 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "text", + "tag": "", + "attrs": {}, + "nesting": 0, + "level": 0, + "content": "Content in section 1.", + "markup": "", + "info": "", + "meta": {}, + "block": false, + "hidden": false + } + ], + "content": "Content in section 1.", + "markup": "", + "info": "", + "meta": {}, + "block": true, + "hidden": false + }, + { + "type": "paragraph_close", + "tag": "p", + "attrs": {}, + "nesting": -1, + "level": 0, + "content": "", + "markup": "", + "info": "", + "meta": {}, + "block": true, + "hidden": false + }, + { + "type": "bullet_list_open", + "tag": "ul", + "attrs": {}, + "map": [ + 7, + 9 + ], + "nesting": 1, + "level": 0, + "content": "", + "markup": "-", + "info": "", + "meta": {}, + "block": true, + "hidden": false + }, + { + "type": "list_item_open", + "tag": "li", + "attrs": {}, + "map": [ + 7, + 8 + ], + "nesting": 1, + "level": 1, + "content": "", + "markup": "-", + "info": "", + "meta": {}, + "block": true, + "hidden": false + }, + { + "type": "paragraph_open", + "tag": "p", + "attrs": {}, + "map": [ + 7, + 8 + ], + "nesting": 1, + "level": 2, + "content": "", + "markup": "", + "info": "", + "meta": {}, + "block": true, + "hidden": true + }, + { + "type": "inline", + "tag": "", + "attrs": {}, + "map": [ + 7, + 8 + ], + "nesting": 0, + "level": 3, + "children": [ + { + "type": "text", + "tag": "", + "attrs": {}, + "nesting": 0, + "level": 0, + "content": "List item 1", + "markup": "", + "info": "", + "meta": {}, + "block": false, + "hidden": false + } + ], + "content": "List item 1", + "markup": "", + "info": "", + "meta": {}, + "block": true, + "hidden": false + }, + { + "type": "paragraph_close", + "tag": "p", + "attrs": {}, + "nesting": -1, + "level": 2, + "content": "", + "markup": "", + "info": "", + "meta": {}, + "block": true, + "hidden": true + }, + { + "type": "list_item_close", + "tag": "li", + "attrs": {}, + "nesting": -1, + "level": 1, + "content": "", + "markup": "-", + "info": "", + "meta": {}, + "block": true, + "hidden": false + }, + { + "type": "list_item_open", + "tag": "li", + "attrs": {}, + "map": [ + 8, + 9 + ], + "nesting": 1, + "level": 1, + "content": "", + "markup": "-", + "info": "", + "meta": {}, + "block": true, + "hidden": false + }, + { + "type": "paragraph_open", + "tag": "p", + "attrs": {}, + "map": [ + 8, + 9 + ], + "nesting": 1, + "level": 2, + "content": "", + "markup": "", + "info": "", + "meta": {}, + "block": true, + "hidden": true + }, + { + "type": "inline", + "tag": "", + "attrs": {}, + "map": [ + 8, + 9 + ], + "nesting": 0, + "level": 3, + "children": [ + { + "type": "text", + "tag": "", + "attrs": {}, + "nesting": 0, + "level": 0, + "content": "List item 2", + "markup": "", + "info": "", + "meta": {}, + "block": false, + "hidden": false + } + ], + "content": "List item 2", + "markup": "", + "info": "", + "meta": {}, + "block": true, + "hidden": false + }, + { + "type": "paragraph_close", + "tag": "p", + "attrs": {}, + "nesting": -1, + "level": 2, + "content": "", + "markup": "", + "info": "", + "meta": {}, + "block": true, + "hidden": true + }, + { + "type": "list_item_close", + "tag": "li", + "attrs": {}, + "nesting": -1, + "level": 1, + "content": "", + "markup": "-", + "info": "", + "meta": {}, + "block": true, + "hidden": false + }, + { + "type": "bullet_list_close", + "tag": "ul", + "attrs": {}, + "nesting": -1, + "level": 0, + "content": "", + "markup": "-", + "info": "", + "meta": {}, + "block": true, + "hidden": false + }, + { + "type": "heading_open", + "tag": "h2", + "attrs": {}, + "map": null, + "nesting": 1, + "level": 0, + "content": "", + "markup": "##", + "info": "", + "meta": {}, + "block": true, + "hidden": false + }, + { + "type": "inline", + "tag": "", + "attrs": {}, + "map": null, + "nesting": 0, + "level": 1, + "children": [ + { + "type": "text", + "tag": "", + "attrs": {}, + "map": null, + "nesting": 0, + "level": 0, + "content": "New Section", + "markup": "", + "info": "", + "meta": {}, + "block": false, + "hidden": false + } + ], + "content": "New Section", + "markup": "", + "info": "", + "meta": {}, + "block": true, + "hidden": false + }, + { + "type": "heading_close", + "tag": "h2", + "attrs": {}, + "map": null, + "nesting": -1, + "level": 0, + "content": "", + "markup": "##", + "info": "", + "meta": {}, + "block": true, + "hidden": false + }, + { + "type": "paragraph_open", + "tag": "p", + "attrs": {}, + "map": null, + "nesting": 1, + "level": 0, + "content": "", + "markup": "", + "info": "", + "meta": {}, + "block": true, + "hidden": false + }, + { + "type": "inline", + "tag": "", + "attrs": {}, + "map": null, + "nesting": 0, + "level": 1, + "children": [ + { + "type": "text", + "tag": "", + "attrs": {}, + "map": null, + "nesting": 0, + "level": 0, + "content": "This section was added via CLI modification.", + "markup": "", + "info": "", + "meta": {}, + "block": false, + "hidden": false + } + ], + "content": "This section was added via CLI modification.", + "markup": "", + "info": "", + "meta": {}, + "block": true, + "hidden": false + }, + { + "type": "paragraph_close", + "tag": "p", + "attrs": {}, + "map": null, + "nesting": -1, + "level": 0, + "content": "", + "markup": "", + "info": "", + "meta": {}, + "block": true, + "hidden": false + } +] \ No newline at end of file diff --git a/retrieved_roundtrip.md b/retrieved_roundtrip.md new file mode 100644 index 00000000..168b644b --- /dev/null +++ b/retrieved_roundtrip.md @@ -0,0 +1,16 @@ +# Test Document + +This is a test file for roundtrip validation. + +## Section 1 + +Content in section 1. + +- List item 1 + +- List item 2 + + +## New Section + +This section was added via CLI modification. \ No newline at end of file diff --git a/test_frontmatter.md b/test_frontmatter.md new file mode 100644 index 00000000..c9246dd8 --- /dev/null +++ b/test_frontmatter.md @@ -0,0 +1,8 @@ +--- +title: Test Document +status: draft +--- + +# Test with Front Matter + +This document has YAML front matter. diff --git a/test_roundtrip.md b/test_roundtrip.md new file mode 100644 index 00000000..a5d1f85e --- /dev/null +++ b/test_roundtrip.md @@ -0,0 +1,9 @@ +# Test Document + +This is a test file for roundtrip validation. + +## Section 1 +Content in section 1. + +- List item 1 +- List item 2