<a href="https://marked.js.org">
<img width="60px" height="60px" src="https://marked.js.org/img/logo-black.svg" align="right" />
</a>
# Marked
[![npm](https://badgen.net/npm/v/marked)](https://www.npmjs.com/package/marked)
[![gzip size](https://badgen.net/badgesize/gzip/https://cdn.jsdelivr.net/npm/marked/marked.min.js)](https://cdn.jsdelivr.net/npm/marked/marked.min.js)
[![install size](https://badgen.net/packagephobia/install/marked)](https://packagephobia.now.sh/result?p=marked)
[![downloads](https://badgen.net/npm/dt/marked)](https://www.npmjs.com/package/marked)
[![github actions](https://github.com/markedjs/marked/workflows/Tests/badge.svg)](https://github.com/markedjs/marked/actions)
[![snyk](https://snyk.io/test/npm/marked/badge.svg)](https://snyk.io/test/npm/marked)
- â¡ built for speed
- â¬ï¸ low-level compiler for parsing markdown without caching or blocking for long periods of time
- âï¸ light-weight while implementing all markdown features from the supported flavors & specifications
- ð works in a browser, on a server, or from a command line interface (CLI)
## Demo
Checkout the [demo page](https://marked.js.org/demo/) to see marked in action â¹ï¸
## Docs
Our [documentation pages](https://marked.js.org) are also rendered using marked ð¯
Also read about:
* [Options](https://marked.js.org/using_advanced)
* [Extensibility](https://marked.js.org/using_pro)
## Compatibility
**Node.js:** Only [current and LTS](https://nodejs.org/en/about/releases/) Node.js versions are supported. End of life Node.js versions may become incompatible with Marked at any point in time.
**Browser:** Not IE11 :)
## Installation
**CLI:**
```sh
npm install -g marked
```
**In-browser:**
```sh
npm install marked
```
## Usage
### Warning: ð¨ Marked does not [sanitize](https://marked.js.org/using_advanced#options) the output HTML. Please use a sanitize library, like [DOMPurify](https://github.com/cure53/DOMPurify) (recommended), [sanitize-html](https://github.com/apostrophecms/sanitize-html) or [insane](https://github.com/bevacqua/insane) on the *output* HTML! ð¨
```
DOMPurify.sanitize(marked.parse(`<img src="x" onerror="alert('not happening')">`));
```
**CLI**
``` bash
# Example with stdin input
$ marked -o hello.html
hello world
^D
$ cat hello.html
<p>hello world</p>
```
```bash
# Print all options
$ marked --help
```
**Browser**
```html
<!doctype html>
<html>
<head>
<meta charset="utf-8"/>
<title>Marked in the browser</title>
</head>
<body>
<div id="content"></div>
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
<script>
document.getElementById('content').innerHTML =
marked.parse('# Marked in the browser\n\nRendered by **marked**.');
</script>
</body>
</html>
```
or import esm module
```html
<script type="module">
import { marked } from "https://cdn.jsdelivr.net/npm/marked/lib/marked.esm.js";
document.getElementById('content').innerHTML =
marked.parse('# Marked in the browser\n\nRendered by **marked**.');
</script>
```
## License
Copyright (c) 2011-2022, Christopher Jeffrey. (MIT License)
owerm
- 粉丝: 159
- 资源: 13
最新资源
- 商用车整车主机厂产品级P2并联混合动力控制器功能规范,HCU控制策略,可以对照直接搭模型
- LMS基础实例,模态分析,锤击实验
- 成熟量产伺服控制器方案 汇川ISP500伺服,提供DSP程序和原理图,代码完整,学习工业代码的范例,含惯量识别,电机参数识别,PWM死区补偿,运动插补等功能
- 三菱Q26UDV系列PLC程序,威纶通触摸屏程序 铝壳电池干燥烘烤机 1.三菱Q26UDV主PLC,cclink总线控制三菱JE-c系列总线伺服电机,整机共40轴伺服运动控制,X,Y,Z三轴取放料伺服
- STM32 高频注入,FOC矢量控制 STM32 BLDC电机,FOC矢量控制驱动 采用stm32作为主控 支持BLDC电机,无刷电机 FOC矢量控制,无刷电机无感FOC 支持矢量控制,高频注入,无感
- 单台三相模块化多电平(mmc)小信号建模 内含功率外环、环流抑制、电流内环、PLL等控制部分完整建模 含参考文献和对应的仿真模型 动态特性如图
- 西门子PLC1200博途V16程序画面例程,具体项目工艺为制药厂生物发酵系统,程序内有报警,模拟量标定处理,温度PID,称重仪表USS通讯和基本的各种数字量控制,硬件组成包含称重仪表通讯及和ET200
- 风光互补与储能仿真 各种需求 风光储 dcdc mppt 逆变器
- 基于51单片机的多路温度检测proteus仿真-ds18b20(仿真+程序+原理图) 仿真图proteus 7.8 proteus 8.9 程序编译器:keil 4 keil 5 编程语言:C语言 功
- 《Python程序设计与算法基础教程(第三版)》PPT与教案
- 三相并网逆变器双闭环控制,电网电流外环电容电流内环控制算法,matlab Simulink仿真模型,有源阻尼,单位功率因数,电网电压和电流同相位
- Comsol散射体Anapole完全教学
- 西门子1200 1500博途单部电梯程序,文件包含一个四层电梯程序,三个六层电梯程序,版本TIA16 仅一个六层电梯有触摸屏画面,程序仅限于用于参考对比 博图版本V15.1及以上
- 15kW充电桩,大厂成熟性量产方案 FPC 15kW充电桩方案,大厂成熟性量产方案,全数字化控制,有原理图,通讯协议,无桥维也纳PFC+全桥LLC源码,可供学习和开发用
- 基于51单片机轮胎胎压气压监测测量仪-数码管显示(仿真+程序) 仿真图proteus 7.8 程序编译器:keil 4 keil 5 编程语言:C语言 主要研究内容: 本课程设计用MPX4115传感器
- 基于51单片机轮胎胎压监测系统-压力传感器(仿真+程序+报告) Proteus仿真版本:proteus7.8 程序编译器:keil 4 编程语言:C语言 基于单片机的轮胎压力检测报警系统设计,5
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈