-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Implement task lists #5139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement task lists #5139
Conversation
Fixed the code for GHC 7... |
Yes, I've changed it to |
This looks good so far. questions:
|
I left the CommonMark parts as a todo because I wasn't sure what was the best way. Thanks for the pointers, I'll take a look in the next couple of days... I guess factoring out the About the "modal logic box operator": we're actually not using the U+25FB ◻WHITE MEDIUM SQUARE, but instead: U+2610 ☐ BALLOT BOX |
Mauro Bieg <notifications@github.com> writes:
I left the CommonMark parts as a todo because I wasn't sure what was the best way. Thanks for the pointers, I'll take a look in the next couple of days... I guess factoring out the `handleTaskList` is worth the second pass to eliminate code duplication?
The performance difference should be minimal
(unmeasurable I'd guess). We're not doing a pass over
the whole AST, just that one list item.
|
I think this is actually starting to look much better! I wasn't sure whether Note that I also changed the CommonMark Writer to output |
I agree, this is looking good! I think the names |
Well, But indeed, other markup languages might use the same syntax for task lists (e.g. org mode checkboxes), and there we could reuse the functions. Therefore renamed to |
One more thought. Looking at our other extensions, I think |
I adopted the name from the GFM spec linked above, but if you think |
Yes, I think we should try to be internally consistent with naming conventions of extensions. |
That is: |
Yes, makes sense. It's changed. |
b9e9dff
to
32155ce
Compare
closes jgm#3051 changes CommonMark Writer to output raw "markdown"
I forgot to document this change properly in the git log message, so I made a trivial follow-up change with documentation. For future reference, API changes should always be carefully document in the commit messages, so they can be indicated in the changelog. |
Right... but good to see this merged into master! |
Thanks for implementing this! There is an issue with the spacing, and another with long lines. Both could be solved by using specific numbering styles with the proper bullets: Should I open a separate issue for it? (I was reluctant since this isn't yet in a released pandoc version) |
@agusmba We currently don't do anything in the docx writer to handle task lists. This is just the unicode fallback. I added the feature mainly for HTML output. But feel free to open a new issue for the docx output, best with an example docx xml snippet of how the output should look like. |
I'll do that. Thanks!! See #5198 |
Does this recognize |
Alok Singh <notifications@github.com> writes:
Does this recognize `- []` as a task list? (no space between the square brackets)
No.
|
@jgm Would that functionality be accepted? I'd be happy to put in the PR since it looks like a one line change. I don't think it really interferes with anything else since I don't see what else |
As mentioned above, this was modeled after GitHub tasklists. There, it needs a space as well, so I would keep it that way. |
closes #3051
rationale:
This currently does not create an extra span, but matches directly on the unicode characters. The code seems reasonably concise to me, but if you think going with a span is a better solution, I can change it of course...
TODO: adjust GFM reader/writer