Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

lys-markdown-parser

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lys-markdown-parser - npm Package Compare versions

Comparing version 0.0.1 to 1.1.0

asset/highlight.min.js

24

package.json
{
"name": "lys-markdown-parser",
"version": "0.0.1",
"version": "1.1.0",
"description": "a js markdown parser",
"main": "index.js",
"main": "dist/index.js",
"scripts": {
"test": "npm run test"
"st": "anywhere -p 9001",
"build": "babel src/index.js --out-file dist/index.js"
},

@@ -18,3 +19,3 @@ "repository": {

],
"author": "lingyansi",
"author": "wlingyan",
"license": "ISC",

@@ -24,3 +25,16 @@ "bugs": {

},
"homepage": "https://github.com/LingYanSi/markdown-parser#readme"
"homepage": "https://github.com/LingYanSi/markdown-parser#readme",
"dependencies": {
"anywhere": "^1.5.0"
},
"devDependencies": {
"@babel/cli": "^7.0.0",
"@babel/core": "^7.0.0",
"@babel/plugin-proposal-class-properties": "^7.0.0",
"@babel/plugin-proposal-decorators": "^7.0.0",
"@babel/plugin-proposal-object-rest-spread": "^7.0.0",
"@babel/plugin-syntax-dynamic-import": "^7.0.0",
"@babel/plugin-transform-async-to-generator": "^7.0.0",
"@babel/preset-env": "^7.0.0"
}
}
# Markdown Parser
## 使用
## demo
[click here](https://lingyansi.github.io/markdown-parser/test/)
## use
```
npm i markdown-parser
npm i lys-markdown-parser
yarn add lys-markdown-parser
```
代码高亮使用[highlight](https://github.com/isagalaev/highlight.js)
support [highlight](https://github.com/isagalaev/highlight.js)
```js
import markdown from 'markdown-parser'
markdown.config({
highlightSource: ['/ddd/ddd/highlight.min.js', '/ddd/ddd/highlight.theme.css'] // 配置代码高亮库
import { markdown, Markdown } from 'lys-markdown-parser'
// import markdown from 'lys-markdown-parser/asset' // 可选择直接引用highlight静态资源
markdown(dom, str, {
asset: ['/ddd/ddd/highlight.min.js', '/ddd/ddd/highlight.theme.css'], // 可以传入highlight的相关js/css资源
})
markdown(dom, str)
// 启用dom复用,可用在markdown编辑器
const mk = new Markdown(dom, {
asset: [],
})
mk.update(mkStr)
```
## support rules
支持audio/video/iframe
```
!![语音](src/audio)
!!![视频](src/video)
!![支持iframe](<iframe></iframe>)
```
## issue
[移步 github issue](https://github.com/LingYanSi/markdown-parser/issues)
## 补充说明
- highlight.js 目前不支持显示代码行数[解释在这里](https://highlightjs.readthedocs.io/en/latest/line-numbers.html)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc