From 53b5d9c1f273f0bd40024e62c3097413427b9373 Mon Sep 17 00:00:00 2001 From: Kyle King Date: Fri, 20 Dec 2024 20:21:31 -0500 Subject: [PATCH 01/18] ci: update linter --- .github/workflows/tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 90598ab..b034d9d 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -20,7 +20,7 @@ jobs: go-version-file: go.mod - name: golangci-lint - uses: golangci/golangci-lint-action@v3 + uses: golangci/golangci-lint-action@v6 with: { version: latest } test: From 5c03784ee810cceff3b5688e470a9e6532b9de61 Mon Sep 17 00:00:00 2001 From: Kyle King Date: Fri, 20 Dec 2024 20:24:55 -0500 Subject: [PATCH 02/18] test: add red test --- djot_parser/examples/todo-list.html | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/djot_parser/examples/todo-list.html b/djot_parser/examples/todo-list.html index c3c19bb..9baa6f6 100644 --- a/djot_parser/examples/todo-list.html +++ b/djot_parser/examples/todo-list.html @@ -1,11 +1,14 @@ From 08c88cd5b8537db6e8aa8fd03440dd6d4c007aac Mon Sep 17 00:00:00 2001 From: Kyle King Date: Fri, 20 Dec 2024 21:12:05 -0500 Subject: [PATCH 03/18] wip: attempt to insert the input --- djot_parser/djot_ast.go | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/djot_parser/djot_ast.go b/djot_parser/djot_ast.go index 329109b..a8c76e8 100644 --- a/djot_parser/djot_ast.go +++ b/djot_parser/djot_ast.go @@ -18,18 +18,16 @@ const ( SparseListNodeKey = "$SparseListNodeKey" DefinitionListItemKey = "$DefinitionListItemKey" - IdKey = "id" - RoleKey = "role" - LinkHrefKey = "href" - ImgAltKey = "alt" - ImgSrcKey = "src" - TaskListClass = "task-list" - CheckedTaskItemClass = "checked" - UncheckedTaskItemClass = "unchecked" - LeftAlignment = "left" - CenterAlignment = "center" - RightAlignment = "right" - DefaultAlignment = "" + IdKey = "id" + RoleKey = "role" + LinkHrefKey = "href" + ImgAltKey = "alt" + ImgSrcKey = "src" + TaskListClass = "task-list" + LeftAlignment = "left" + CenterAlignment = "center" + RightAlignment = "right" + DefaultAlignment = "" ) type DjotNode int @@ -879,11 +877,6 @@ func buildDjotAst( Children: definitionItemChildren, }) } else { - if insertedNodeType == TaskListNode && bytes.HasPrefix(openToken.Bytes(document), []byte("- [ ]")) { - attributes.Append(djot_tokenizer.DjotAttributeClassKey, UncheckedTaskItemClass) - } else if insertedNodeType == TaskListNode { - attributes.Append(djot_tokenizer.DjotAttributeClassKey, CheckedTaskItemClass) - } if !isSparseList && list[i+1].Type == djot_tokenizer.ParagraphBlock { children := buildDjotAst(document, context, DjotLocalContext{TextNode: true}, list[i+2:i+1+list[i+1].JumpToPair]) if list[i+1+list[i+1].JumpToPair].End == len(document) { @@ -896,9 +889,19 @@ func buildDjotAst( Attributes: attributes, }) } else { + children := buildDjotAst(document, context, localContext, list[i+1:i+openToken.JumpToPair]) + if insertedNodeType == TaskListNode { + var taskNodeAttributes tokenizer.Attributes + taskNodeAttributes.Set("disabled", "") + taskNodeAttributes.Set("type", "checkbox") + if !bytes.HasPrefix(openToken.Bytes(document), []byte("- [ ]")) { + taskNodeAttributes.Set("checked", "") + } + children = append(children, TreeNode[DjotNode]{Type: TextNode, Attributes: taskNodeAttributes}) + } *nodesRef = append(*nodesRef, TreeNode[DjotNode]{ Type: ListItemNode, - Children: buildDjotAst(document, context, localContext, list[i+1:i+openToken.JumpToPair]), + Children: children, Attributes: attributes, }) } From 4fcdfca61db4f6489f74dc4e2742164f96c70055 Mon Sep 17 00:00:00 2001 From: Kyle King Date: Fri, 20 Dec 2024 21:36:27 -0500 Subject: [PATCH 04/18] feat: add InputNode --- djot_parser/djot_ast.go | 5 ++++- djot_parser/djot_html.go | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/djot_parser/djot_ast.go b/djot_parser/djot_ast.go index a8c76e8..1835d9c 100644 --- a/djot_parser/djot_ast.go +++ b/djot_parser/djot_ast.go @@ -45,6 +45,7 @@ const ( ListItemNode DefinitionTermNode DefinitionItemNode + InputNode CodeNode RawNode ThematicBreakNode @@ -102,6 +103,8 @@ func (n DjotNode) String() string { return "TaskListNode" case DefinitionListNode: return "DefinitionListNode" + case InputNode: + return "InputNode" case CodeNode: return "CodeNode" case RawNode: @@ -897,7 +900,7 @@ func buildDjotAst( if !bytes.HasPrefix(openToken.Bytes(document), []byte("- [ ]")) { taskNodeAttributes.Set("checked", "") } - children = append(children, TreeNode[DjotNode]{Type: TextNode, Attributes: taskNodeAttributes}) + children = append(children, TreeNode[DjotNode]{Type: InputNode, Attributes: taskNodeAttributes}) } *nodesRef = append(*nodesRef, TreeNode[DjotNode]{ Type: ListItemNode, diff --git a/djot_parser/djot_html.go b/djot_parser/djot_html.go index 5902d7f..9b41b00 100644 --- a/djot_parser/djot_html.go +++ b/djot_parser/djot_html.go @@ -94,6 +94,7 @@ var DefaultConversionRegistry = map[DjotNode]Conversion{ s.InlineNodeConverter("dt", n) s.Writer.WriteString("\n") }, + InputNode: func(s ConversionState, n func(c Children)) { s.StandaloneNodeConverter("input") }, DefinitionItemNode: func(s ConversionState, n func(c Children)) { s.BlockNodeConverter("dd", n) }, SectionNode: func(s ConversionState, n func(c Children)) { s.BlockNodeConverter("section", n) }, QuoteNode: func(s ConversionState, n func(c Children)) { s.BlockNodeConverter("blockquote", n) }, From 57f333af76c051c050e8b72007ce4aedbf52ae33 Mon Sep 17 00:00:00 2001 From: Kyle King Date: Fri, 20 Dec 2024 21:58:20 -0500 Subject: [PATCH 05/18] ci: fix lint failure and warning --- djot_parser/djot_html.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/djot_parser/djot_html.go b/djot_parser/djot_html.go index 9b41b00..0879759 100644 --- a/djot_parser/djot_html.go +++ b/djot_parser/djot_html.go @@ -94,7 +94,7 @@ var DefaultConversionRegistry = map[DjotNode]Conversion{ s.InlineNodeConverter("dt", n) s.Writer.WriteString("\n") }, - InputNode: func(s ConversionState, n func(c Children)) { s.StandaloneNodeConverter("input") }, + InputNode: func(s ConversionState, n func(c Children)) { s.StandaloneNodeConverter("input") }, DefinitionItemNode: func(s ConversionState, n func(c Children)) { s.BlockNodeConverter("dd", n) }, SectionNode: func(s ConversionState, n func(c Children)) { s.BlockNodeConverter("section", n) }, QuoteNode: func(s ConversionState, n func(c Children)) { s.BlockNodeConverter("blockquote", n) }, From ca4da4af0a0d836fb985c30f7e3d3ad0c09fed38 Mon Sep 17 00:00:00 2001 From: Kyle King Date: Wed, 25 Dec 2024 09:51:04 -0500 Subject: [PATCH 06/18] refactor: restore to master --- djot_parser/djot_ast.go | 42 +++++++++++++++++----------------------- djot_parser/djot_html.go | 1 - 2 files changed, 18 insertions(+), 25 deletions(-) diff --git a/djot_parser/djot_ast.go b/djot_parser/djot_ast.go index 1835d9c..329109b 100644 --- a/djot_parser/djot_ast.go +++ b/djot_parser/djot_ast.go @@ -18,16 +18,18 @@ const ( SparseListNodeKey = "$SparseListNodeKey" DefinitionListItemKey = "$DefinitionListItemKey" - IdKey = "id" - RoleKey = "role" - LinkHrefKey = "href" - ImgAltKey = "alt" - ImgSrcKey = "src" - TaskListClass = "task-list" - LeftAlignment = "left" - CenterAlignment = "center" - RightAlignment = "right" - DefaultAlignment = "" + IdKey = "id" + RoleKey = "role" + LinkHrefKey = "href" + ImgAltKey = "alt" + ImgSrcKey = "src" + TaskListClass = "task-list" + CheckedTaskItemClass = "checked" + UncheckedTaskItemClass = "unchecked" + LeftAlignment = "left" + CenterAlignment = "center" + RightAlignment = "right" + DefaultAlignment = "" ) type DjotNode int @@ -45,7 +47,6 @@ const ( ListItemNode DefinitionTermNode DefinitionItemNode - InputNode CodeNode RawNode ThematicBreakNode @@ -103,8 +104,6 @@ func (n DjotNode) String() string { return "TaskListNode" case DefinitionListNode: return "DefinitionListNode" - case InputNode: - return "InputNode" case CodeNode: return "CodeNode" case RawNode: @@ -880,6 +879,11 @@ func buildDjotAst( Children: definitionItemChildren, }) } else { + if insertedNodeType == TaskListNode && bytes.HasPrefix(openToken.Bytes(document), []byte("- [ ]")) { + attributes.Append(djot_tokenizer.DjotAttributeClassKey, UncheckedTaskItemClass) + } else if insertedNodeType == TaskListNode { + attributes.Append(djot_tokenizer.DjotAttributeClassKey, CheckedTaskItemClass) + } if !isSparseList && list[i+1].Type == djot_tokenizer.ParagraphBlock { children := buildDjotAst(document, context, DjotLocalContext{TextNode: true}, list[i+2:i+1+list[i+1].JumpToPair]) if list[i+1+list[i+1].JumpToPair].End == len(document) { @@ -892,19 +896,9 @@ func buildDjotAst( Attributes: attributes, }) } else { - children := buildDjotAst(document, context, localContext, list[i+1:i+openToken.JumpToPair]) - if insertedNodeType == TaskListNode { - var taskNodeAttributes tokenizer.Attributes - taskNodeAttributes.Set("disabled", "") - taskNodeAttributes.Set("type", "checkbox") - if !bytes.HasPrefix(openToken.Bytes(document), []byte("- [ ]")) { - taskNodeAttributes.Set("checked", "") - } - children = append(children, TreeNode[DjotNode]{Type: InputNode, Attributes: taskNodeAttributes}) - } *nodesRef = append(*nodesRef, TreeNode[DjotNode]{ Type: ListItemNode, - Children: children, + Children: buildDjotAst(document, context, localContext, list[i+1:i+openToken.JumpToPair]), Attributes: attributes, }) } diff --git a/djot_parser/djot_html.go b/djot_parser/djot_html.go index 0879759..5902d7f 100644 --- a/djot_parser/djot_html.go +++ b/djot_parser/djot_html.go @@ -94,7 +94,6 @@ var DefaultConversionRegistry = map[DjotNode]Conversion{ s.InlineNodeConverter("dt", n) s.Writer.WriteString("\n") }, - InputNode: func(s ConversionState, n func(c Children)) { s.StandaloneNodeConverter("input") }, DefinitionItemNode: func(s ConversionState, n func(c Children)) { s.BlockNodeConverter("dd", n) }, SectionNode: func(s ConversionState, n func(c Children)) { s.BlockNodeConverter("section", n) }, QuoteNode: func(s ConversionState, n func(c Children)) { s.BlockNodeConverter("blockquote", n) }, From d0f81f054c8f7e7b381ea7d187aa04feb9066ccc Mon Sep 17 00:00:00 2001 From: Kyle King Date: Thu, 2 Jan 2025 15:48:15 -0500 Subject: [PATCH 07/18] feat: write input --- djot_parser/djot_html.go | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/djot_parser/djot_html.go b/djot_parser/djot_html.go index 85e6cbb..9e01e06 100644 --- a/djot_parser/djot_html.go +++ b/djot_parser/djot_html.go @@ -91,7 +91,23 @@ var DefaultConversionRegistry = map[DjotNode]Conversion{ DefinitionListNode: func(s ConversionState, n func(c Children)) { s.BlockNodeConverter("dl", n) }, UnorderedListNode: func(s ConversionState, n func(c Children)) { s.BlockNodeConverter("ul", n) }, OrderedListNode: func(s ConversionState, n func(c Children)) { s.BlockNodeConverter("ol", n) }, - ListItemNode: func(s ConversionState, n func(c Children)) { s.BlockNodeConverter("li", n) }, + ListItemNode: func(s ConversionState, n func(c Children)) { + class := s.Node.Attributes.Get("class") + if class == "checked" || class == "unchecked" { + s.Writer.InTag("li")(func() { + s.Writer.WriteString("\n") + s.Writer.WriteString("").WriteString("\n") + n(s.Node.Children[:1]) + s.Writer.WriteString("\n") + }).WriteString("\n") + } else { + s.BlockNodeConverter("li", n) + } + }, DefinitionTermNode: func(s ConversionState, n func(c Children)) { s.InlineNodeConverter("dt", n) s.Writer.WriteString("\n") From ea3f76f6a346d036a07fb81f8b7903e025dfa79c Mon Sep 17 00:00:00 2001 From: Kyle King Date: Thu, 2 Jan 2025 15:48:26 -0500 Subject: [PATCH 08/18] refactor: replace strings with const --- djot_parser/djot_html.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/djot_parser/djot_html.go b/djot_parser/djot_html.go index 9e01e06..7821e00 100644 --- a/djot_parser/djot_html.go +++ b/djot_parser/djot_html.go @@ -92,12 +92,12 @@ var DefaultConversionRegistry = map[DjotNode]Conversion{ UnorderedListNode: func(s ConversionState, n func(c Children)) { s.BlockNodeConverter("ul", n) }, OrderedListNode: func(s ConversionState, n func(c Children)) { s.BlockNodeConverter("ol", n) }, ListItemNode: func(s ConversionState, n func(c Children)) { - class := s.Node.Attributes.Get("class") - if class == "checked" || class == "unchecked" { + class := s.Node.Attributes.Get(djot_tokenizer.DjotAttributeClassKey) + if class == CheckedTaskItemClass || class == UncheckedTaskItemClass { s.Writer.InTag("li")(func() { s.Writer.WriteString("\n") s.Writer.WriteString("").WriteString("\n") From ab4b5a7ab08447e8ca27b89e0068ac4e1342f357 Mon Sep 17 00:00:00 2001 From: Kyle King Date: Thu, 2 Jan 2025 15:56:05 -0500 Subject: [PATCH 09/18] refactor: try BlockNodeConverter Can't use because requires popping the class Key --- djot_parser/djot_html.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/djot_parser/djot_html.go b/djot_parser/djot_html.go index 7821e00..79862ec 100644 --- a/djot_parser/djot_html.go +++ b/djot_parser/djot_html.go @@ -94,8 +94,8 @@ var DefaultConversionRegistry = map[DjotNode]Conversion{ ListItemNode: func(s ConversionState, n func(c Children)) { class := s.Node.Attributes.Get(djot_tokenizer.DjotAttributeClassKey) if class == CheckedTaskItemClass || class == UncheckedTaskItemClass { - s.Writer.InTag("li")(func() { - s.Writer.WriteString("\n") + s.Node.Attributes.Set(djot_tokenizer.DjotAttributeClassKey, "") + s.BlockNodeConverter("li", (func(c Children) { s.Writer.WriteString("").WriteString("\n") n(s.Node.Children[:1]) s.Writer.WriteString("\n") - }).WriteString("\n") + })) } else { s.BlockNodeConverter("li", n) } From 05a9f2fa19028c11f5fa181112c4dc5fd92dcded Mon Sep 17 00:00:00 2001 From: Kyle King Date: Thu, 2 Jan 2025 15:56:07 -0500 Subject: [PATCH 10/18] Revert "refactor: try BlockNodeConverter" This reverts commit ab4b5a7ab08447e8ca27b89e0068ac4e1342f357. --- djot_parser/djot_html.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/djot_parser/djot_html.go b/djot_parser/djot_html.go index 79862ec..7821e00 100644 --- a/djot_parser/djot_html.go +++ b/djot_parser/djot_html.go @@ -94,8 +94,8 @@ var DefaultConversionRegistry = map[DjotNode]Conversion{ ListItemNode: func(s ConversionState, n func(c Children)) { class := s.Node.Attributes.Get(djot_tokenizer.DjotAttributeClassKey) if class == CheckedTaskItemClass || class == UncheckedTaskItemClass { - s.Node.Attributes.Set(djot_tokenizer.DjotAttributeClassKey, "") - s.BlockNodeConverter("li", (func(c Children) { + s.Writer.InTag("li")(func() { + s.Writer.WriteString("\n") s.Writer.WriteString("").WriteString("\n") n(s.Node.Children[:1]) s.Writer.WriteString("\n") - })) + }).WriteString("\n") } else { s.BlockNodeConverter("li", n) } From 1df7eef69939cff79f4198d438997a2eadddd109 Mon Sep 17 00:00:00 2001 From: Kyle King Date: Thu, 2 Jan 2025 16:18:08 -0500 Subject: [PATCH 11/18] test: add failing fuzz test --- djot_parser/testdata/fuzz/FuzzDjotE2E/326270ac6d2da709 | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 djot_parser/testdata/fuzz/FuzzDjotE2E/326270ac6d2da709 diff --git a/djot_parser/testdata/fuzz/FuzzDjotE2E/326270ac6d2da709 b/djot_parser/testdata/fuzz/FuzzDjotE2E/326270ac6d2da709 new file mode 100644 index 0000000..0f74b4e --- /dev/null +++ b/djot_parser/testdata/fuzz/FuzzDjotE2E/326270ac6d2da709 @@ -0,0 +1,2 @@ +go test fuzz v1 +string("- [X] ") From 032e79c6428321ef3db6cb1a0a751c00c0f735a4 Mon Sep 17 00:00:00 2001 From: Kyle King Date: Thu, 2 Jan 2025 16:18:50 -0500 Subject: [PATCH 12/18] fix: handle checklist without content `go test -run=FuzzDjotE2E/326270ac6d2da709 github.com/sivukhin/godjot/djot_parser` --- djot_parser/djot_html.go | 4 +++- djot_parser/testdata/fuzz/FuzzDjotE2E/326270ac6d2da709 | 2 -- 2 files changed, 3 insertions(+), 3 deletions(-) delete mode 100644 djot_parser/testdata/fuzz/FuzzDjotE2E/326270ac6d2da709 diff --git a/djot_parser/djot_html.go b/djot_parser/djot_html.go index 7821e00..5df4c60 100644 --- a/djot_parser/djot_html.go +++ b/djot_parser/djot_html.go @@ -101,7 +101,9 @@ var DefaultConversionRegistry = map[DjotNode]Conversion{ s.Writer.WriteString(" checked=\"\"") } s.Writer.WriteString("/>").WriteString("\n") - n(s.Node.Children[:1]) + if len(s.Node.Children) > 1 { + n(s.Node.Children[:1]) + } s.Writer.WriteString("\n") }).WriteString("\n") } else { diff --git a/djot_parser/testdata/fuzz/FuzzDjotE2E/326270ac6d2da709 b/djot_parser/testdata/fuzz/FuzzDjotE2E/326270ac6d2da709 deleted file mode 100644 index 0f74b4e..0000000 --- a/djot_parser/testdata/fuzz/FuzzDjotE2E/326270ac6d2da709 +++ /dev/null @@ -1,2 +0,0 @@ -go test fuzz v1 -string("- [X] ") From 3f25070eeeb3eac3e0a3c829208210ce99ab1ba8 Mon Sep 17 00:00:00 2001 From: Kyle King Date: Sun, 5 Jan 2025 19:40:27 -0500 Subject: [PATCH 13/18] fix: render all node children --- djot_parser/djot_html.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/djot_parser/djot_html.go b/djot_parser/djot_html.go index 5df4c60..5f67d83 100644 --- a/djot_parser/djot_html.go +++ b/djot_parser/djot_html.go @@ -101,10 +101,7 @@ var DefaultConversionRegistry = map[DjotNode]Conversion{ s.Writer.WriteString(" checked=\"\"") } s.Writer.WriteString("/>").WriteString("\n") - if len(s.Node.Children) > 1 { - n(s.Node.Children[:1]) - } - s.Writer.WriteString("\n") + n(s.Node.Children) }).WriteString("\n") } else { s.BlockNodeConverter("li", n) From f0deea234cbcfc2f332ba10edca121853e524ea6 Mon Sep 17 00:00:00 2001 From: Kyle King Date: Sun, 5 Jan 2025 19:44:07 -0500 Subject: [PATCH 14/18] test: improve todo list unit test --- djot_parser/examples/todo-list.djot | 7 ++++++- djot_parser/examples/todo-list.html | 16 ++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/djot_parser/examples/todo-list.djot b/djot_parser/examples/todo-list.djot index 2d8e7aa..314c604 100644 --- a/djot_parser/examples/todo-list.djot +++ b/djot_parser/examples/todo-list.djot @@ -1,3 +1,8 @@ - [ ] unchecked + + * 1 + * 2 + * 3 - [x] checked -- [ ] finish \ No newline at end of file +- [ ] Inline _formatting ([link](https://google.com))_ +- [ ] finish diff --git a/djot_parser/examples/todo-list.html b/djot_parser/examples/todo-list.html index 9baa6f6..610d5f6 100644 --- a/djot_parser/examples/todo-list.html +++ b/djot_parser/examples/todo-list.html @@ -2,6 +2,17 @@
  • unchecked +
      +
    • +1 +
    • +
    • +2 +
    • +
    • +3 +
    • +
  • @@ -9,6 +20,11 @@
  • +Inline formatting (link) +
  • +
  • + finish +
  • From 8feacbd0e1587d98648f292823472bca1ec663a5 Mon Sep 17 00:00:00 2001 From: Kyle King Date: Sun, 5 Jan 2025 19:53:17 -0500 Subject: [PATCH 15/18] test: add nested paragraph --- djot_parser/examples/todo-nested-paragraph.djot | 5 +++++ djot_parser/examples/todo-nested-paragraph.html | 11 +++++++++++ 2 files changed, 16 insertions(+) create mode 100644 djot_parser/examples/todo-nested-paragraph.djot create mode 100644 djot_parser/examples/todo-nested-paragraph.html diff --git a/djot_parser/examples/todo-nested-paragraph.djot b/djot_parser/examples/todo-nested-paragraph.djot new file mode 100644 index 0000000..4a53d02 --- /dev/null +++ b/djot_parser/examples/todo-nested-paragraph.djot @@ -0,0 +1,5 @@ +- [ ] an unchecked task list item + + with two paragraphs + +- [x] checked item diff --git a/djot_parser/examples/todo-nested-paragraph.html b/djot_parser/examples/todo-nested-paragraph.html new file mode 100644 index 0000000..80d2f74 --- /dev/null +++ b/djot_parser/examples/todo-nested-paragraph.html @@ -0,0 +1,11 @@ +
      +
    • + +

      an unchecked task list item

      +

      with two paragraphs

      +
    • +
    • + +

      checked item

      +
    • +
    From 4b28fbd2ff1bdc92b630152a2c7c3b4637b6e0ea Mon Sep 17 00:00:00 2001 From: Kyle King Date: Sun, 5 Jan 2025 19:53:36 -0500 Subject: [PATCH 16/18] test: set expected output --- djot_parser/examples/todo-list.html | 1 - djot_parser/examples/todo-nested-paragraph.djot | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/djot_parser/examples/todo-list.html b/djot_parser/examples/todo-list.html index 610d5f6..7e51530 100644 --- a/djot_parser/examples/todo-list.html +++ b/djot_parser/examples/todo-list.html @@ -25,6 +25,5 @@
  • finish -
  • diff --git a/djot_parser/examples/todo-nested-paragraph.djot b/djot_parser/examples/todo-nested-paragraph.djot index 4a53d02..09fd662 100644 --- a/djot_parser/examples/todo-nested-paragraph.djot +++ b/djot_parser/examples/todo-nested-paragraph.djot @@ -1,5 +1,5 @@ -- [ ] an unchecked task list item +* [ ] an unchecked task list item with two paragraphs -- [x] checked item +* [x] checked item From f3e6a2d29362f64cd7adc2c273a0919ee2f56c02 Mon Sep 17 00:00:00 2001 From: Kyle King Date: Sun, 5 Jan 2025 19:59:23 -0500 Subject: [PATCH 17/18] Revert "test: set expected output" This reverts commit 4b28fbd2ff1bdc92b630152a2c7c3b4637b6e0ea. --- djot_parser/examples/todo-list.html | 1 + djot_parser/examples/todo-nested-paragraph.djot | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/djot_parser/examples/todo-list.html b/djot_parser/examples/todo-list.html index 7e51530..610d5f6 100644 --- a/djot_parser/examples/todo-list.html +++ b/djot_parser/examples/todo-list.html @@ -25,5 +25,6 @@
  • finish +
  • diff --git a/djot_parser/examples/todo-nested-paragraph.djot b/djot_parser/examples/todo-nested-paragraph.djot index 09fd662..4a53d02 100644 --- a/djot_parser/examples/todo-nested-paragraph.djot +++ b/djot_parser/examples/todo-nested-paragraph.djot @@ -1,5 +1,5 @@ -* [ ] an unchecked task list item +- [ ] an unchecked task list item with two paragraphs -* [x] checked item +- [x] checked item From d0937f5fd053be23b0854e417eecd766b4107cee Mon Sep 17 00:00:00 2001 From: Kyle King Date: Tue, 7 Jan 2025 20:23:14 -0500 Subject: [PATCH 18/18] test: remove unexpected new line --- djot_parser/examples/todo-list.html | 1 - 1 file changed, 1 deletion(-) diff --git a/djot_parser/examples/todo-list.html b/djot_parser/examples/todo-list.html index 610d5f6..7e51530 100644 --- a/djot_parser/examples/todo-list.html +++ b/djot_parser/examples/todo-list.html @@ -25,6 +25,5 @@
  • finish -