jbt / markdown-editor

Live (Github-flavored) Markdown Editor
http://jbt.github.com/markdown-editor
ISC License
2.82k stars 643 forks source link

Added code to enable the ability to detect and render Task Lists #107

Closed austinmm closed 4 years ago

austinmm commented 4 years ago

This pull request should solve open issue #88. I added a function in index.js, which uses Regex to match and replace the task list syntax to its proper HTML form. The reason that task lists were not already supported was due to markdown-it, which markdown-editor uses to render the markdown syntax into HTML, does not currently support this feature.

aero31aero commented 4 years ago

Hey, thanks for the PR and I think it looks awesome. However, I was intrigued that this feature hasn't been requested before by any user of markdown-it and went to search for it. It turns out that there are plugins like this that provide this functionality.

In the future, we should use npm to keep our markdown-it and friends up to date instead of directly adding them and changing them in our repository. At that time, we would stop using this current implementation and start using one of the available plugins.

aero31aero commented 4 years ago

Merged, thanks! Do you want me to try your hand at implementing the plugin based approach?