feat/support-tasks-in-lists #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "main"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Support for auto inserting tasks in bullet lists (GH style).
Would it be possible to integrate this in the regexp that's matched below your change, and add some conditional logic based on whether the task group in the regexp matched, to make it less verbose?
Yes I can do that.
Oh what a coincidence, I just finished implementing this in our fork (which handles this issue for us). I did exactly what Marijn is suggesting.
Here's the regex i landed on
^([ \t]*)([-+*])([ \t]{1,4}\[[ xX]\])?([ \t]+)capturing groups:
Changed passed the
typefrommatch[2]tomatch[2] + (match[3] || '')@ -52,1 +53,3 @@let after = match[4], len = match[0].length(match = /^([ \t]*)([-+*][ \t]+\[[ xX]\])([ \t]+)/.exec(nodeStart(node, doc)))) {let after = match[3], len = match[0].lengthif (after.length > 8) { after = after.slice(0, after.length - 8); len -= 8 }Why is this 8?
Great. Want to submit your code as a new PR so I can merge it in?
Can do, will push it up tomorrow or after at most
Pull request closed