Skip to content
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

Github Task Lists #587

Closed
wants to merge 2 commits into from
Closed

Conversation

jhollingworth
Copy link

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 #107

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
@styfle
Copy link
Member

styfle commented May 8, 2015

@jhollingworth
Very cool. Hopefully this gets merged.
However this project doesn't seem very active anymore.
You might want to checkout markdown-it

@chjj
Copy link
Member

chjj commented May 8, 2015

I had an implementation of this that I reverted because I was originally completely against further GFM extras. I thought I had lost it when my laptop bricked, but I realized it wasn't on a separate unpushed branch. It's in the git history: #107

I'll compare these two.

@jhollingworth
Copy link
Author

do you mean 26cef98 and a5e39a6? The one issue I saw with yours was it does not support the scenario where a list has items that are not checkboxes.

  • Foo
  • Bar
  • Baz

Also, have your view changed on adding GFM extras or do you not want to merge this?

@@ -27,6 +27,7 @@ var block = {
text: /^[^\n]+/
};

block.checkbox = /^\[([ x])\] +/;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to GFM docs [v] is a valid way to indicate a task is complete as well.

@ghost
Copy link

ghost commented May 15, 2015

@jhollingworth thanks for starting with the lexer as that fits my use case.

@felixSchl
Copy link

What's happening with this?

@at15 at15 mentioned this pull request Aug 4, 2015
2 tasks
@cdaguerre
Copy link

Will this make it to core? Any ETA?

@dvcrn
Copy link

dvcrn commented Nov 11, 2015

Using this code in a app right now and seems to work good. Would love to see this getting merged back

screen shot 2015-11-11 at 2 39 31 pm

levlaz pushed a commit to levlaz/braindump that referenced this pull request Nov 25, 2015
Permalink are now created for notes.

GFM TaksLists are supported now. :) Thanks to
[this](markedjs/marked#587) PR.
@msto
Copy link

msto commented Dec 19, 2015

Any chance of this getting pulled in in the near future? Would love to have checkboxes available in ipython notebooks, and they're waiting on it to be implemented here.

ipython/ipython#8402
ipython/ipython#6288

@noerw
Copy link

noerw commented Feb 9, 2016

would love to see this too

@Sohalt
Copy link

Sohalt commented Feb 18, 2016

Any updates on this?
This would make integration of checklists for https://github.com/wekan/wekan much easier.

@Sohalt Sohalt mentioned this pull request Feb 19, 2016
@ousamabenyounes
Copy link

Checklist feature is an important feature for wekan project...
So merging this pull request would help developpers to finish this other pull request wekan/wekan#298 (comment) and be sure they won't use another alternative...Hope to see this on wekan project soon...

@chrisdias
Copy link

Hi! Any chance this will get merged? We would like top pick up this fix for VS Code.

@dvcrn
Copy link

dvcrn commented Apr 20, 2016

This project is definitely dead. I merged this in a own fork and use that for markright

@ZackWard
Copy link

ZackWard commented Jul 9, 2016

@matt- @parleur Thank you for maintaining this project. I would love to +1 this PR.

@styfle
Copy link
Member

styfle commented Aug 14, 2017

To reference myself above:

Many users have migrated from marked to markdown-it due to inactivity and failure to merge the 163 pending PRs. This PR in particular has at least 30 people interested but it's mostly too late.

@chrisdias @richarddavenport
VS Code switched to markdown-it and now has plugin to support Task Lists
https://github.com/mjbvz/vscode-markdown-checkboxes

@samiraguiar
Copy link

Thank you, @styfle, I had missed your comment. Now I can finally unsubscribe from this thread.

@Xaekai
Copy link

Xaekai commented Aug 21, 2017

I guess I'm going to give up too and switch to markdown-it

The negligence of the maintainers here is unacceptable. I've waited over a year.

@joshbruce
Copy link
Member

joshbruce commented Dec 6, 2017

See #956

Focusing on CommonMark and GFM specifications, without extensions (task lists in GFM are an extension not part of core). Cleaning house and assessing the damage. If this gets implemented it will probably be through extension via open/closed.

Thanks, and apologies for the inconvenience.

@joshbruce
Copy link
Member

Reopening as things have changed a bit. We are looking to support GFM, which is only CommonMark with extensions. We have two test beds at present one for CommonMark the other for GFM. There are two failing tests (both examples) in the task list test suite.

Can we verify this solution causes those to pass?

@joshbruce joshbruce reopened this Apr 13, 2018
@@ -211,7 +212,8 @@ This code will output the following HTML:
- codespan(*string* code)
- br()
- del(*string* text)
- link(*string* href, *string* title, *string* text)
- link(*string* href, *string* title, *string* text, [*boolean* checked]).
- `checked` only defined when `gfm` is `true` and there is a check box at the start of the list item (e.g. `* [ ] foo`).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file was moved to USING_PRO.md. and is causing merge conflicts.

@huruji
Copy link

huruji commented Apr 17, 2018

thanks for the creator and maintainers' job, I hope I can see checkbox in my project,thank you

@styfle styfle requested review from UziTech and joshbruce April 17, 2018 21:09
@styfle
Copy link
Member

styfle commented Apr 17, 2018

@jhollingworth Are you still interested in working on this PR?

@joshbruce
Copy link
Member

Going to go ahead and close as overcome by events. If you would like to continue working toward this goal:

  1. Read Defibrillator challenge #1216
  2. Submit a PR that solves GFM example 272 and 273 in the gfm/gfm-spec.js file.

@joshbruce joshbruce closed this Apr 18, 2018
@tomtheisen tomtheisen mentioned this pull request May 8, 2018
5 tasks
@30Wedge
Copy link

30Wedge commented Jun 13, 2018

Ping; I want to show that I'm still interested in this PR.
Jupyter uses marked, and I'd like to use gfm task lists in my notebook.

@joshbruce
Copy link
Member

@30Wedge: What version of Marked are you using?

0.4.0 should include task lists if I'm remembering #1250 properly.

@30Wedge
Copy link

30Wedge commented Jun 13, 2018

Looks like they were using 0.3.0
Thanks for responding so quickly!

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.

To do lists