Skip to content

Github Task Lists #2

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

Merged
merged 1 commit into from
Apr 24, 2016
Merged

Github Task Lists #2

merged 1 commit into from
Apr 24, 2016

Conversation

clehner
Copy link

@clehner clehner commented Apr 24, 2016

This applies markedjs#587 to add support for GitHub Task Lists under the gfm flag. This feature is useful for mutable markdown documents and issues in git-ssb.

Changes to API

  • list(string body, boolean ordered, boolean taskList)
  • listitem(string text, [boolean checked]).

checked is defined when you have a list item which starts with [ ] or
[x].If defined its a boolean depending on whether the x is
present. When checked is defined we add a input type type checkbox to
the list item and add the class task-list-item-checkbox.

taskList is true if a list has any list items where checked is
defined. When true we add the class task-list to the list.

Add support for Github Task Lists under the gfm flag.

Changes to API

* list(*string* body, *boolean* ordered, *boolean* taskList)
* listitem(*string* text, [*boolean* checked]).

`checked` is defined when you have a list item which starts with `[ ] ` or
`[x] `.If defined its a boolean depending on whether the `x` is
present. When checked is defined we add a input type type `checkbox` to
the list item and add the class `task-list-item-checkbox`.

`taskList` is true if a list has any list items where `checked` is
defined. When true we add the class `task-list` to the list.

Resolves markedjs#107
@pfrazee
Copy link

pfrazee commented Apr 24, 2016

I dont see any major reason not to include this. It's good not to let the standard markdown syntax become burdensome to implement, but this is a syntax that, if not implemented by an application, still looks reasonable as plaintext.

@clehner
Copy link
Author

clehner commented Apr 24, 2016

That's reasonable. I will merge the PR. @pfraze can you publish a release with the changes?

@clehner clehner merged commit da821a9 into master Apr 24, 2016
@clehner clehner deleted the tasklists branch April 24, 2016 21:04
@pfrazee
Copy link

pfrazee commented Apr 24, 2016

published 0.6.0

@clehner
Copy link
Author

clehner commented Apr 24, 2016

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants