在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):revin/markdown-it-task-lists开源软件地址(OpenSource Url):https://github.com/revin/markdown-it-task-lists开源编程语言(OpenSource Language):JavaScript 100.0%开源软件介绍(OpenSource Introduction):markdown-it-task-listsA markdown-it plugin to create GitHub-style task lists What it does
Why is this useful?When you have markdown documentation with checklists, rendering HTML checkboxes out of the list items looks nicer than the raw square brackets. Installationnpm install markdown-it-task-lists UsageUse it the same as a normal markdown-it plugin: var md = require('markdown-it');
var taskLists = require('markdown-it-task-lists');
var parser = md().use(taskLists);
var result = parser.render(...); // markdown string containing task list items The rendered checkboxes are disabled; to change this, pass a truthy value into
the var parser = md().use(taskLists, {enabled: true}); If you'd like to wrap the rendered list items in a var parser = md().use(taskLists, {label: true}); To add the label after the checkbox pass a truthy value to var parser = md().use(taskLists, {label: true, labelAfter: true}); Note: This option does require the The options can be combined, of course. Browser UsageIf you use one of the versions of this module available in Testsnpm install
npm test LicenseISC |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论