From a9cc087613232f9d3f003e781e191c00900a684a Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Tue, 7 Jan 2020 10:26:46 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20Vditor=20=E6=94=AF=E6=8C=81=20https://g?= =?UTF-8?q?ithub.com/Vanessa219/vditor/issues/41?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/vditor_renderer_test.go | 6 +++--- vditor_renderer.go | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/test/vditor_renderer_test.go b/test/vditor_renderer_test.go index d89795d7b6..80779401dc 100644 --- a/test/vditor_renderer_test.go +++ b/test/vditor_renderer_test.go @@ -125,7 +125,7 @@ var spinVditorDOMTests = []*parseTest{ {"48", "

link\n

", "

link\n

"}, {"47", "

`1`\n

", "

1 \n

"}, {"46", "

- [x] f\n

", ""}, - //{"45", "

- [ ] b\n

", ""}, + {"45", "

- [ ] b\n

", ""}, {"44", "

* [ ]\n

", "

* [ ]\n

"}, {"43", "

* [ \n

", "

* [ \n

"}, {"42", "

* [\n

", "

* [\n

"}, @@ -159,8 +159,8 @@ var spinVditorDOMTests = []*parseTest{ {"12", "

Hi Hello, world!

", "

Hi Hello, world!\n

"}, {"11", "

Hi Hello, world!

", "

Hi Hello, world!\n

"}, - //{"10", "", ""}, - //{"9", "", ""}, + {"10", "", ""}, + {"9", "", ""}, {"8", "> ", "

> \n

"}, {"7", ">", "

>\n

"}, {"6", "

> foo

", "

foo\n

"}, diff --git a/vditor_renderer.go b/vditor_renderer.go index fd3c1aa488..d657f83576 100644 --- a/vditor_renderer.go +++ b/vditor_renderer.go @@ -598,8 +598,6 @@ func (r *VditorRenderer) renderListItem(node *Node, entering bool) (WalkStatus, attrs = append(attrs, []string{"data-marker", string(node.marker)}) attrs = append(attrs, []string{"class", r.option.GFMTaskListItemClass}) } - // TODO: 未解决列表项局部渲染 - //attrs = append(attrs, []string{"data-block", "0"}) r.tag("li", attrs, false) } else { r.tag("/li", nil, false)