From 5c877c8afe6a4c2a2b2216c49a5b890586739949 Mon Sep 17 00:00:00 2001 From: Alexander Scheel Date: Sat, 7 Mar 2020 21:14:45 -0500 Subject: [PATCH] Insert space after task-list checkboxes According to the GFM spec (and per other implementations), a space should be inserted after the checkbox input element. This gives visual separation between the checkbox and its element. Update code and tests to match. Signed-off-by: Alexander Scheel --- extension/_test/tasklist.txt | 12 ++++++------ extension/tasklist.go | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/extension/_test/tasklist.txt b/extension/_test/tasklist.txt index 6bbe1b6..dad65c6 100644 --- a/extension/_test/tasklist.txt +++ b/extension/_test/tasklist.txt @@ -4,8 +4,8 @@ - [x] bar //- - - - - - - - -// //= = = = = = = = = = = = = = = = = = = = = = = =// @@ -19,12 +19,12 @@ - [ ] bim //- - - - - - - - -// //= = = = = = = = = = = = = = = = = = = = = = = =// diff --git a/extension/tasklist.go b/extension/tasklist.go index 825f8d5..1f3e52c 100644 --- a/extension/tasklist.go +++ b/extension/tasklist.go @@ -92,9 +92,9 @@ func (r *TaskCheckBoxHTMLRenderer) renderTaskCheckBox(w util.BufWriter, source [ w.WriteString(`") + w.WriteString(" /> ") } else { - w.WriteString(">") + w.WriteString("> ") } return gast.WalkContinue, nil }