diff --git a/test/fixtures/delete-node/_input.md b/test/fixtures/delete-node/_input.md new file mode 100644 index 0000000..f5a7600 --- /dev/null +++ b/test/fixtures/delete-node/_input.md @@ -0,0 +1 @@ +test~~test~~test diff --git a/test/fixtures/delete-node/input.json b/test/fixtures/delete-node/input.json new file mode 100644 index 0000000..d23cda9 --- /dev/null +++ b/test/fixtures/delete-node/input.json @@ -0,0 +1,97 @@ +{ + "type": "Paragraph", + "children": [ + { + "type": "Str", + "value": "test", + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + }, + "range": [ + 0, + 4 + ], + "raw": "test" + }, + { + "type": "Delete", + "children": [ + { + "type": "Str", + "value": "test", + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "range": [ + 6, + 10 + ], + "raw": "test" + } + ], + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "range": [ + 4, + 12 + ], + "raw": "~~test~~" + }, + { + "type": "Str", + "value": "test", + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "range": [ + 12, + 16 + ], + "raw": "test" + } + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "range": [ + 0, + 16 + ], + "raw": "test~~test~~test" +} diff --git a/test/fixtures/delete-node/output.json b/test/fixtures/delete-node/output.json new file mode 100644 index 0000000..baeee46 --- /dev/null +++ b/test/fixtures/delete-node/output.json @@ -0,0 +1,118 @@ +{ + "type": "Paragraph", + "children": [ + { + "type": "Sentence", + "raw": "test~~test~~test", + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "range": [ + 0, + 16 + ], + "children": [ + { + "type": "Str", + "raw": "test", + "value": "test", + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + }, + "range": [ + 0, + 4 + ] + }, + { + "type": "Delete", + "children": [ + { + "type": "Str", + "value": "test", + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "range": [ + 6, + 10 + ], + "raw": "test" + } + ], + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "range": [ + 4, + 12 + ], + "raw": "~~test~~" + }, + { + "type": "Str", + "raw": "test", + "value": "test", + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "range": [ + 12, + 16 + ] + } + ], + "contexts": [] + } + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "range": [ + 0, + 16 + ], + "raw": "test~~test~~test" +} \ No newline at end of file