# - ? Grid table (pandoc)
# - ? Pipe table (php md pandoc)
# - [x] Line blocks (pandoc)
-# - [ ] Task lists (pandoc)
+# - [x] Task lists (pandoc)
# - [ ] Definition lists (php md, pandoc)
# - [-] Numbered example lists (pandoc)
# - [-] Metadata blocks (pandoc)
sub( /<\/p>\n/, "", p );
}
sub( /\n$/, "", p );
+
+ # Task List (pandoc)
+ if ( p ~ /^\[ \].*/ ) { p = "<input type=checkbox disabled />" substr(p, 4); }
+ else if ( p ~ /^\[[xX]\].*/ ) { p = "<input type=checkbox disabled checked />" substr(p, 4); }
+ else if ( p ~ /^<p>\[ \].*/ ) { p = "<p><input type=checkbox disabled />" substr(p, 7); }
+ else if ( p ~ /^<p>\[[xX]\].*/ ) { p = "<p><input type=checkbox disabled checked />" substr(p, 7); }
return "<li>" p "</li>\n" _list( block, last );
}