lys-markdown-parser
Advanced tools
Comparing version 0.0.1 to 1.1.0
{ | ||
"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) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
193075
15
1728
0
43
1
8
1
+ Addedanywhere@^1.5.0
+ Addedaccepts@1.3.8(transitive)
+ Addedanywhere@1.6.0(transitive)
+ Addedarr-diff@4.0.0(transitive)
+ Addedarr-flatten@1.1.0(transitive)
+ Addedarr-union@3.1.0(transitive)
+ Addedarray-unique@0.3.2(transitive)
+ Addedassign-symbols@1.0.0(transitive)
+ Addedatob@2.1.2(transitive)
+ Addedbase@0.11.2(transitive)
+ Addedbatch@0.6.1(transitive)
+ Addedbraces@2.3.2(transitive)
+ Addedcache-base@1.0.1(transitive)
+ Addedclass-utils@0.3.6(transitive)
+ Addedcollection-visit@1.0.0(transitive)
+ Addedcomponent-emitter@1.3.1(transitive)
+ Addedconnect@3.7.0(transitive)
+ Addedconnect-history-api-fallback@1.6.0(transitive)
+ Addedcopy-descriptor@0.1.1(transitive)
+ Addeddebug@2.6.9(transitive)
+ Addeddecode-uri-component@0.2.2(transitive)
+ Addeddefine-property@0.2.51.0.02.0.2(transitive)
+ Addeddepd@1.1.22.0.0(transitive)
+ Addeddestroy@1.2.0(transitive)
+ Addedee-first@1.1.1(transitive)
+ Addedencodeurl@1.0.22.0.0(transitive)
+ Addedescape-html@1.0.3(transitive)
+ Addedetag@1.8.1(transitive)
+ Addedeventemitter3@4.0.7(transitive)
+ Addedexpand-brackets@2.1.4(transitive)
+ Addedextend-shallow@2.0.13.0.2(transitive)
+ Addedextglob@2.0.4(transitive)
+ Addedfill-range@4.0.0(transitive)
+ Addedfinalhandler@1.1.2(transitive)
+ Addedfollow-redirects@1.15.9(transitive)
+ Addedfor-in@1.0.2(transitive)
+ Addedfragment-cache@0.2.1(transitive)
+ Addedfresh@0.5.2(transitive)
+ Addedfunction-bind@1.1.2(transitive)
+ Addedget-value@2.0.6(transitive)
+ Addedhas-value@0.3.11.0.0(transitive)
+ Addedhas-values@0.1.41.0.0(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedhttp-errors@1.6.32.0.0(transitive)
+ Addedhttp-proxy@1.18.1(transitive)
+ Addedhttp-proxy-middleware@0.19.2(transitive)
+ Addedinherits@2.0.32.0.4(transitive)
+ Addedis-accessor-descriptor@1.0.1(transitive)
+ Addedis-buffer@1.1.6(transitive)
+ Addedis-data-descriptor@1.0.1(transitive)
+ Addedis-descriptor@0.1.71.0.3(transitive)
+ Addedis-extendable@0.1.11.0.1(transitive)
+ Addedis-extglob@2.1.1(transitive)
+ Addedis-glob@4.0.3(transitive)
+ Addedis-number@3.0.0(transitive)
+ Addedis-plain-object@2.0.4(transitive)
+ Addedis-windows@1.0.2(transitive)
+ Addedisarray@1.0.0(transitive)
+ Addedisobject@2.1.03.0.1(transitive)
+ Addedkind-of@3.2.24.0.06.0.3(transitive)
+ Addedlodash@4.17.21(transitive)
+ Addedmap-cache@0.2.2(transitive)
+ Addedmap-visit@1.0.0(transitive)
+ Addedmicromatch@3.1.10(transitive)
+ Addedmime@1.6.0(transitive)
+ Addedmime-db@1.52.0(transitive)
+ Addedmime-types@2.1.35(transitive)
+ Addedminimist@1.2.8(transitive)
+ Addedmixin-deep@1.3.2(transitive)
+ Addedms@2.0.02.1.3(transitive)
+ Addednanomatch@1.2.13(transitive)
+ Addednegotiator@0.6.3(transitive)
+ Addedobject-copy@0.1.0(transitive)
+ Addedobject-visit@1.0.1(transitive)
+ Addedobject.pick@1.3.0(transitive)
+ Addedon-finished@2.3.02.4.1(transitive)
+ Addedparseurl@1.3.3(transitive)
+ Addedpascalcase@0.1.1(transitive)
+ Addedposix-character-classes@0.1.1(transitive)
+ Addedrange-parser@1.2.1(transitive)
+ Addedregex-not@1.0.2(transitive)
+ Addedrepeat-element@1.1.4(transitive)
+ Addedrepeat-string@1.6.1(transitive)
+ Addedrequires-port@1.0.0(transitive)
+ Addedresolve-url@0.2.1(transitive)
+ Addedret@0.1.15(transitive)
+ Addedsafe-regex@1.1.0(transitive)
+ Addedsend@0.19.0(transitive)
+ Addedserve-index@1.9.1(transitive)
+ Addedserve-static@1.16.2(transitive)
+ Addedset-value@2.0.1(transitive)
+ Addedsetprototypeof@1.1.01.2.0(transitive)
+ Addedsnapdragon@0.8.2(transitive)
+ Addedsnapdragon-node@2.1.1(transitive)
+ Addedsnapdragon-util@3.0.1(transitive)
+ Addedsource-map@0.5.7(transitive)
+ Addedsource-map-resolve@0.5.3(transitive)
+ Addedsource-map-url@0.4.1(transitive)
+ Addedsplit-string@3.1.0(transitive)
+ Addedstatic-extend@0.1.2(transitive)
+ Addedstatuses@1.5.02.0.1(transitive)
+ Addedto-object-path@0.3.0(transitive)
+ Addedto-regex@3.0.2(transitive)
+ Addedto-regex-range@2.1.1(transitive)
+ Addedtoidentifier@1.0.1(transitive)
+ Addedunion-value@1.0.1(transitive)
+ Addedunpipe@1.0.0(transitive)
+ Addedunset-value@1.0.0(transitive)
+ Addedurix@0.1.0(transitive)
+ Addeduse@3.1.1(transitive)
+ Addedutils-merge@1.0.1(transitive)