gruehle / MarkdownPreview

Brackets extension for previewing markdown files
MIT License
277 stars 61 forks source link

Render GFM tasks with checkboxes as intended. #40

Open 5310 opened 10 years ago

5310 commented 10 years ago

Github Flavored Markdown has a rather useful extension for writing task-lists.

- [x] Do a thing.
- [ ] Do another thing.

Becomes:

Currently, the GFM parser for MarkdownPreview shows these tasks as standard list items, like so:

I request that checkbox characters are substituted in place of the intended markup like so:

Optionally, if MarkdownPreview could render interactive checkboxes that would alter the source file, that would be even better!

gruehle commented 10 years ago

@5310 Thanks for the report, and sorry it's taken so long for me to respond. This extension uses the awesome marked library, which unfortunately doesn't support task lists yet. Once marked is updated, I'll pull the latest version into this extension.

Here is the tracking bug in marked.

5310 commented 10 years ago

Now that you mention it, it this does seem like a parser-side feature. Oops. Thank you for the link to the issue.

Although it doesn't seem that GFM tasklists support is particularly active an issue at Marked at the moment!

Edit: On second glance I seemed to have spoke too soon (again), a closed duplicate of the main issues seems to have been referenced as recently as March '14.

nojaf commented 10 years ago

When using GFM it's easy to let Github compile the markdown. Try https://api.github.com/markdown to request the markdown and you could use https://github.com/sindresorhus/github-markdown-css to style it