File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
apps/server/src/services/import Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ class CustomMarkdownRenderer extends Renderer {
6666 // Handle todo-list in the CKEditor format.
6767 if ( item . task ) {
6868 let itemBody = '' ;
69- const checkbox = this . checkbox ( { checked : ! ! item . checked } ) ;
69+ const checkbox = this . checkbox ( { checked : ! ! item . checked , raw : "- [ ]" , type : "checkbox" } ) ;
7070 if ( item . loose ) {
7171 if ( item . tokens [ 0 ] ?. type === 'paragraph' ) {
7272 item . tokens [ 0 ] . text = checkbox + item . tokens [ 0 ] . text ;
@@ -86,7 +86,7 @@ class CustomMarkdownRenderer extends Renderer {
8686 itemBody += checkbox ;
8787 }
8888
89- itemBody += `<span class="todo-list__label__description">${ this . parser . parse ( item . tokens , ! ! item . loose ) } </span>` ;
89+ itemBody += `<span class="todo-list__label__description">${ this . parser . parse ( item . tokens . filter ( t => t . type !== "checkbox" ) ) } </span>` ;
9090 return `<li><label class="todo-list__label">${ itemBody } </label></li>` ;
9191 }
9292
You can’t perform that action at this time.
0 commit comments