javascript - how to remove bullet points from tasks rendered by marked.js
问题描述
i'm using the marked.js library to parse input from a textarea into html .
in markdown a task syntax is written like this : - [x] done task
or - [ ] not done task
.
result after parsing :
<ul>
<li>
<input checked="" disabled="" type="checkbox">
done task
</li>
</ul>
<ul>
<li>
<input disabled="" type="checkbox">
not yet done task
</li>
</ul>
i tried to search for a function to override and tweek it to get my desired result , but i didn't understand how the listitem function works .
how do i remove the bullet points only on the task case , but not if i'm parsing a normal ordered/unordered list syntax ?
解决方案
推荐阅读
- python - PIP 安装程序中 manylinux1 与 manylinux2020 轮文件之间的区别
- python - 主管服务无权访问音频设备(“设置 open_pcm 时出错:没有这样的文件或目录”)
- java - Java将图像更新为Mysql:结果为空(插入,选择图像工作正常)
- python - 如何在熊猫数据框中创建 10k 条记录?
- windows - PathBuf::starts_with 不适用于反斜杠
- ajax - 使用 AJAX 时带有承载令牌的 JWT 可防止 CSRF 和 XSS
- c - 我们可以在使用嵌入式系统时在 C 中使用 exit() 函数吗
- header - Fastify & NestJS - 如何在拦截器中设置响应头
- node.js - 查询 MongoDb 仅一个月,但我的日期是字符串格式“DD/MM/YYYY”使用时刻
- mysql - 为什么即使我的列中的电子邮件地址没有值为 0,我也会在查询中得到结果