docs:更新文档

This commit is contained in:
张益铭
2021-03-01 15:06:11 +08:00
parent 1542135ab0
commit 9064b372e8
5835 changed files with 904126 additions and 161722 deletions

173
node_modules/markdown-it-anchor/CHANGELOG.md generated vendored Normal file
View File

@@ -0,0 +1,173 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
## [Unreleased][unreleased]
## [5.3.0] - 2020-05-12
* Fix support for user defined ids by using `markdown-it-attrs`.
* Updated dependencies -> `found 0 vulnerabilities`
## [5.2.7] - 2020-04-01
* Added `permalinkAttrs` option
## [5.2.6] - ???
* ???
## [5.2.5] - 2019-10-16
* removing `aria-hidden` from links ([#58])
## [5.2.4] - 2019-06-03
* rolled back to `...linkTokens`
* executed `npm audit fix` to fix dependencies vunerabilities
## [5.2.3] - 2019-05-28
* `...linkTokens` -> `(...).apply(null, linkTokens)` IE doesn't support spread syntax.
## [5.2.2] - 2019-05-28
* `...linkTokens` -> `[].concat(linkTokens)` makes IE compatible.
## [5.2.1] - 2019-05-28
* fix typo
## [5.2.0] - 2019-05-28
* Added support for unpkg
* Added support for mjs
* Fixes: [#40] and [#46]
* New option `permalinkSpace` makes possible to suppress the whitespace between the permalink and the header text value. Defaults to `true` ([#52])
* Patch to fix ([#35])
## [5.0.1] - 2018-06-14
* `trim()` before `toLowerCase()` to prevent dashes as prefixes and suffixes.
## [5.0.0] - 2018-06-14
* NEW Contributor: nagaozen
* Drop `string` package in favour of `encodeURIComponent`.
Fixes: [#44], [#43], [#38], [#17]. Obsoletes [#45].
## [4.0.0] - 2017-02-26
* Drop Babel. This drops support for Node.js versions that doesn't
support ES6.
* Support code in titles. ([#27])
* Support individual header level selection. ([#27])
## [3.0.0] - 2017-02-06
* Use existing ID as slug if present. This drops the support for
markdown-it 5 and lower, hence the major bump. ([#22])
## [2.5.1] - 2016-11-19
* Patch for supporting "Constructor" title. ([#18])
## [2.5.0] - 2016-03-22
* Test against markdown-it 6.
* Support anchors with HTML in header.
## [2.4.0] - 2016-02-12
* Add a callback option. ([#16]).
## [2.3.3] - 2015-12-21
* Add a live example ([#13]).
## [2.3.2] - 2015-11-29
* Test against markdown-it 5.
* Keep assigning `module.exports` after Babel 6 upgrade (that
assigns `exports.default` only instead), using
`babel-plugin-add-module-exports`. ([#12])
## [2.3.1] - 2015-11-29
* Remove hard dependency on markdown-it and replace `lodash.assign` with
`Object.assign`. ([#11])
* Move to Babel 6.
* Use `babel-plugin-transform-object-assign` to have `Object.assign`
work in ES5 environments.
* Add the permalink during compilation instead of rendering.
## [2.3.0] - 2015-08-13
* Allow to pass HTML as permalink symbol. ([#8])
## [2.2.1] - 2015-08-13
* Do not crash when permalink is enabled and headers below specified
level are present. ([#7])
## [2.2.0] - 2015-07-20
* Use `core.ruler` to add attributes so other plugins can reuse them. ([#5])
## [2.1.0] - 2015-06-22
* Set `aria-hidden` on permalink anchor.
## [2.0.0] - 2015-05-28
* Place the permalink after the header by default. ([#3])
If you want to keep the old behavior, set the `permalinkBefore` option
to `true`:
```js
const md = require('markdown-it')
.use(require('markdown-it-anchor'), {
permalink: true,
permalinkBefore: true
})
```
## [1.1.2] - 2015-05-23
* Fix a code example in the readme.
## [1.1.1] - 2015-05-20
* Slight tweaks in `package.json`.
* Upgrade Babel.
## [1.1.0] - 2015-04-24
* Allow to customize the permalink symbol. ([#1])
* Handle duplicate slugs by appending a number.
## 1.0.0 - 2015-03-18
* Initial release.
[unreleased]: https://github.com/valeriangalliat/markdown-it-anchor/compare/v5.2.4...HEAD
[5.2.4]: https://github.com/valeriangalliat/markdown-it-anchor/compare/v5.2.3...v5.2.4
[5.2.3]: https://github.com/valeriangalliat/markdown-it-anchor/compare/v5.2.2...v5.2.3
[5.2.2]: https://github.com/valeriangalliat/markdown-it-anchor/compare/v5.2.1...v5.2.2
[5.2.1]: https://github.com/valeriangalliat/markdown-it-anchor/compare/v5.2.0...v5.2.1
[5.2.0]: https://github.com/valeriangalliat/markdown-it-anchor/compare/v5.0.1...v5.2.0
[5.0.1]: https://github.com/valeriangalliat/markdown-it-anchor/compare/v5.0.0...v5.0.1
[5.0.0]: https://github.com/valeriangalliat/markdown-it-anchor/compare/v4.0.0...v5.0.0
[4.0.0]: https://github.com/valeriangalliat/markdown-it-anchor/compare/v3.0.0...v4.0.0
[3.0.0]: https://github.com/valeriangalliat/markdown-it-anchor/compare/v2.5.1...v3.0.0
[2.5.1]: https://github.com/valeriangalliat/markdown-it-anchor/compare/v2.5.0...v2.5.1
[2.5.0]: https://github.com/valeriangalliat/markdown-it-anchor/compare/v2.4.0...v2.5.0
[2.4.0]: https://github.com/valeriangalliat/markdown-it-anchor/compare/v2.3.3...v2.4.0
[2.3.3]: https://github.com/valeriangalliat/markdown-it-anchor/compare/v2.3.2...v2.3.3
[2.3.2]: https://github.com/valeriangalliat/markdown-it-anchor/compare/v2.3.1...v2.3.2
[2.3.1]: https://github.com/valeriangalliat/markdown-it-anchor/compare/v2.3.0...v2.3.1
[2.3.0]: https://github.com/valeriangalliat/markdown-it-anchor/compare/v2.2.1...v2.3.0
[2.2.1]: https://github.com/valeriangalliat/markdown-it-anchor/compare/v2.2.0...v2.2.1
[2.2.0]: https://github.com/valeriangalliat/markdown-it-anchor/compare/v2.1.0...v2.2.0
[2.1.0]: https://github.com/valeriangalliat/markdown-it-anchor/compare/v2.0.0...v2.1.0
[2.0.0]: https://github.com/valeriangalliat/markdown-it-anchor/compare/v1.1.2...v2.0.0
[1.1.2]: https://github.com/valeriangalliat/markdown-it-anchor/compare/v1.1.1...v1.1.2
[1.1.1]: https://github.com/valeriangalliat/markdown-it-anchor/compare/v1.1.0...v1.1.1
[1.1.0]: https://github.com/valeriangalliat/markdown-it-anchor/compare/v1.0.0...v1.1.0
[#1]: https://github.com/valeriangalliat/markdown-it-anchor/pull/1
[#3]: https://github.com/valeriangalliat/markdown-it-anchor/issues/3
[#5]: https://github.com/valeriangalliat/markdown-it-anchor/issues/5
[#7]: https://github.com/valeriangalliat/markdown-it-anchor/issues/7
[#8]: https://github.com/valeriangalliat/markdown-it-anchor/issues/8
[#11]: https://github.com/valeriangalliat/markdown-it-anchor/pull/11
[#12]: https://github.com/valeriangalliat/markdown-it-anchor/issues/12
[#13]: https://github.com/valeriangalliat/markdown-it-anchor/issues/13
[#16]: https://github.com/valeriangalliat/markdown-it-anchor/issues/16
[#17]: https://github.com/valeriangalliat/markdown-it-anchor/issues/17
[#18]: https://github.com/valeriangalliat/markdown-it-anchor/issues/18
[#22]: https://github.com/valeriangalliat/markdown-it-anchor/pull/22
[#27]: https://github.com/valeriangalliat/markdown-it-anchor/issues/27
[#35]: https://github.com/valeriangalliat/markdown-it-anchor/issues/35
[#38]: https://github.com/valeriangalliat/markdown-it-anchor/issues/38
[#40]: https://github.com/valeriangalliat/markdown-it-anchor/issues/40
[#43]: https://github.com/valeriangalliat/markdown-it-anchor/issues/43
[#44]: https://github.com/valeriangalliat/markdown-it-anchor/issues/44
[#45]: https://github.com/valeriangalliat/markdown-it-anchor/pull/45
[#45]: https://github.com/valeriangalliat/markdown-it-anchor/issues/46
[#58]: https://github.com/valeriangalliat/markdown-it-anchor/issues/58

95
node_modules/markdown-it-anchor/README.md generated vendored Normal file
View File

@@ -0,0 +1,95 @@
# markdown-it-anchor [![npm version](http://img.shields.io/npm/v/markdown-it-anchor.svg?style=flat-square)](https://www.npmjs.org/package/markdown-it-anchor)
> Header anchors for [markdown-it].
[markdown-it]: https://github.com/markdown-it/markdown-it
## Usage
```js
const md = require('markdown-it')()
.use(require('markdown-it-anchor'), opts)
```
See a [demo as JSFiddle](https://jsfiddle.net/9ukc8dy6/).
The `opts` object can contain:
Name | Description | Default
------------------|----------------------------------------------------------------|-----------------------------------
`level` | Minimum level to apply anchors on or array of selected levels. | 1
`slugify` | A custom slugification function. | See [`index.js`](index.js)
`permalink` | Whether to add permalinks next to titles. | `false`
`renderPermalink` | A custom permalink rendering function. | See [`index.js`](index.js)
`permalinkClass` | The class of the permalink anchor. | `header-anchor`
`permalinkSpace` | Place space between the header text and the permalink anchor. | `true`
`permalinkSymbol` | The symbol in the permalink anchor. | `¶`
`permalinkBefore` | Place the permalink before the title. | `false`
`permalinkHref` | A custom permalink `href` rendering function. | See [`index.js`](index.js)
`permalinkAttrs` | A custom permalink attributes rendering function. | See [`index.js`](index.js)
`callback` | Called with token and info after rendering. | `undefined`
The `renderPermalink` function takes the slug, an options object with
the above options, and then all the usual markdown-it rendering
arguments.
All headers above `level` will then have an `id` attribute with a slug
of their content. `level` can also be an array of headers levels to
apply the anchor, like `[2, 3]` to have an anchor on only level 2 and
3 headers.
If `permalink` is `true`, a `¶` symbol linking to the header itself will
be added.
You may want to use the [link symbol](http://graphemica.com/🔗) as
`permalinkSymbol`, or a symbol from your favorite web font.
The `callback` option is a function that will be called at the end of
rendering with the `token` and an `info` object. The `info` object has
`title` and `slug` properties with the token content and the slug used
for the identifier.
## User-Friendly URLs
Starting from `v5.0.0`, `markdown-it-anchor` dropped package `string`
keeping it's core value of being an unopinionated and secure library. Yet,
users looking for backward compatibility may want the old slugify:
```sh
$ npm i -S string
```
```js
const string = require('string')
const legacySlugify = s => string(s).slugify().toString()
const md = require('markdown-it')()
const anchor = require('markdown-it-anchor', {
slugify: legacySlugify
})
```
## Unicode Support
Unicode is supported by default. Yet, if you are looking for a "prettier"
--opinionated-- link, _i.e_ without %xx, you may want to take a look at `uslug`:
```sh
$ npm i -S uslug
```
```js
const uslug = require('uslug')
const uslugify = s => uslug(s)
const md = require('markdown-it')()
const anchor = require('markdown-it-anchor', {
slugify: uslugify
})
```
## Table of Contents
Looking for an automatic table of contents (TOC) generator? Take a look at
[markdown-it-toc-done-right](https://www.npmjs.com/package/markdown-it-toc-done-right) it's
made from the ground to be a great companion of this plugin.

24
node_modules/markdown-it-anchor/UNLICENSE generated vendored Normal file
View File

@@ -0,0 +1,24 @@
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to <http://unlicense.org/>

View File

@@ -0,0 +1,2 @@
var n={false:"push",true:"unshift"},e=Object.prototype.hasOwnProperty,r=function(n,r,t){var i=n,u=2;if(t&&e.call(r,i))throw Error("User defined id attribute '"+n+"' is NOT unique. Please fix it in your markdown to continue.");for(;e.call(r,i);)i=n+"-"+u++;return r[i]=!0,i},t=function n(e,t){t=Object.assign({},n.defaults,t),e.core.ruler.push("anchor",function(n){var e,i={},u=n.tokens,o=Array.isArray(t.level)?(e=t.level,function(n){return e.includes(n)}):function(n){return function(e){return e>=n}}(t.level);u.filter(function(n){return"heading_open"===n.type}).filter(function(n){return o(Number(n.tag.substr(1)))}).forEach(function(e){var o=u[u.indexOf(e)+1].children.filter(function(n){return"text"===n.type||"code_inline"===n.type}).reduce(function(n,e){return n+e.content},""),c=e.attrGet("id");c=null==c?r(t.slugify(o),i,!1):r(c,i,!0),e.attrSet("id",c),t.permalink&&t.renderPermalink(c,t,n,u.indexOf(e)),t.callback&&t.callback(e,{slug:c,title:o})})})};t.defaults={level:1,slugify:function(n){return encodeURIComponent(String(n).trim().toLowerCase().replace(/\s+/g,"-"))},permalink:!1,renderPermalink:function(e,r,t,i){var u,o=[Object.assign(new t.Token("link_open","a",1),{attrs:[["class",r.permalinkClass],["href",r.permalinkHref(e,t)]].concat(Object.entries(r.permalinkAttrs(e,t)))}),Object.assign(new t.Token("html_block","",0),{content:r.permalinkSymbol}),new t.Token("link_close","a",-1)];r.permalinkSpace&&o[n[!r.permalinkBefore]](Object.assign(new t.Token("text","",0),{content:" "})),(u=t.tokens[i+1].children)[n[r.permalinkBefore]].apply(u,o)},permalinkClass:"header-anchor",permalinkSpace:!0,permalinkSymbol:"¶",permalinkBefore:!1,permalinkHref:function(n){return"#"+n},permalinkAttrs:function(n){return{}}},module.exports=t;
//# sourceMappingURL=markdownItAnchor.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,2 @@
var n={false:"push",true:"unshift"},e=Object.prototype.hasOwnProperty,r=function(n,r,t){var i=n,u=2;if(t&&e.call(r,i))throw Error("User defined id attribute '"+n+"' is NOT unique. Please fix it in your markdown to continue.");for(;e.call(r,i);)i=n+"-"+u++;return r[i]=!0,i},t=function n(e,t){t=Object.assign({},n.defaults,t),e.core.ruler.push("anchor",function(n){var e,i={},u=n.tokens,o=Array.isArray(t.level)?(e=t.level,function(n){return e.includes(n)}):function(n){return function(e){return e>=n}}(t.level);u.filter(function(n){return"heading_open"===n.type}).filter(function(n){return o(Number(n.tag.substr(1)))}).forEach(function(e){var o=u[u.indexOf(e)+1].children.filter(function(n){return"text"===n.type||"code_inline"===n.type}).reduce(function(n,e){return n+e.content},""),c=e.attrGet("id");c=null==c?r(t.slugify(o),i,!1):r(c,i,!0),e.attrSet("id",c),t.permalink&&t.renderPermalink(c,t,n,u.indexOf(e)),t.callback&&t.callback(e,{slug:c,title:o})})})};t.defaults={level:1,slugify:function(n){return encodeURIComponent(String(n).trim().toLowerCase().replace(/\s+/g,"-"))},permalink:!1,renderPermalink:function(e,r,t,i){var u,o=[Object.assign(new t.Token("link_open","a",1),{attrs:[["class",r.permalinkClass],["href",r.permalinkHref(e,t)]].concat(Object.entries(r.permalinkAttrs(e,t)))}),Object.assign(new t.Token("html_block","",0),{content:r.permalinkSymbol}),new t.Token("link_close","a",-1)];r.permalinkSpace&&o[n[!r.permalinkBefore]](Object.assign(new t.Token("text","",0),{content:" "})),(u=t.tokens[i+1].children)[n[r.permalinkBefore]].apply(u,o)},permalinkClass:"header-anchor",permalinkSpace:!0,permalinkSymbol:"¶",permalinkBefore:!1,permalinkHref:function(n){return"#"+n},permalinkAttrs:function(n){return{}}};export default t;
//# sourceMappingURL=markdownItAnchor.mjs.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,2 @@
const e={false:"push",true:"unshift"},n=Object.prototype.hasOwnProperty,t=(e,t,r)=>{let i=e,l=2;if(r&&n.call(t,i))throw Error(`User defined id attribute '${e}' is NOT unique. Please fix it in your markdown to continue.`);for(;n.call(t,i);)i=`${e}-${l++}`;return t[i]=!0,i},r=(e,n)=>{n=Object.assign({},r.defaults,n),e.core.ruler.push("anchor",e=>{const r={},i=e.tokens,l=Array.isArray(n.level)?(o=n.level,e=>o.includes(e)):(e=>n=>n>=e)(n.level);var o;i.filter(e=>"heading_open"===e.type).filter(e=>l(Number(e.tag.substr(1)))).forEach(l=>{const o=i[i.indexOf(l)+1].children.filter(e=>"text"===e.type||"code_inline"===e.type).reduce((e,n)=>e+n.content,"");let a=l.attrGet("id");a=null==a?t(n.slugify(o),r,!1):t(a,r,!0),l.attrSet("id",a),n.permalink&&n.renderPermalink(a,n,e,i.indexOf(l)),n.callback&&n.callback(l,{slug:a,title:o})})})};r.defaults={level:1,slugify:e=>encodeURIComponent(String(e).trim().toLowerCase().replace(/\s+/g,"-")),permalink:!1,renderPermalink:(n,t,r,i)=>{const l=[Object.assign(new r.Token("link_open","a",1),{attrs:[["class",t.permalinkClass],["href",t.permalinkHref(n,r)],...Object.entries(t.permalinkAttrs(n,r))]}),Object.assign(new r.Token("html_block","",0),{content:t.permalinkSymbol}),new r.Token("link_close","a",-1)];t.permalinkSpace&&l[e[!t.permalinkBefore]](Object.assign(new r.Token("text","",0),{content:" "})),r.tokens[i+1].children[e[t.permalinkBefore]](...l)},permalinkClass:"header-anchor",permalinkSpace:!0,permalinkSymbol:"¶",permalinkBefore:!1,permalinkHref:e=>"#"+e,permalinkAttrs:e=>({})};export default r;
//# sourceMappingURL=markdownItAnchor.modern.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,2 @@
!function(n,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(n=n||self).markdownItAnchor=e()}(this,function(){var n={false:"push",true:"unshift"},e=Object.prototype.hasOwnProperty,t=function(n,t,r){var i=n,o=2;if(r&&e.call(t,i))throw Error("User defined id attribute '"+n+"' is NOT unique. Please fix it in your markdown to continue.");for(;e.call(t,i);)i=n+"-"+o++;return t[i]=!0,i},r=function n(e,r){r=Object.assign({},n.defaults,r),e.core.ruler.push("anchor",function(n){var e,i={},o=n.tokens,u=Array.isArray(r.level)?(e=r.level,function(n){return e.includes(n)}):function(n){return function(e){return e>=n}}(r.level);o.filter(function(n){return"heading_open"===n.type}).filter(function(n){return u(Number(n.tag.substr(1)))}).forEach(function(e){var u=o[o.indexOf(e)+1].children.filter(function(n){return"text"===n.type||"code_inline"===n.type}).reduce(function(n,e){return n+e.content},""),c=e.attrGet("id");c=null==c?t(r.slugify(u),i,!1):t(c,i,!0),e.attrSet("id",c),r.permalink&&r.renderPermalink(c,r,n,o.indexOf(e)),r.callback&&r.callback(e,{slug:c,title:u})})})};return r.defaults={level:1,slugify:function(n){return encodeURIComponent(String(n).trim().toLowerCase().replace(/\s+/g,"-"))},permalink:!1,renderPermalink:function(e,t,r,i){var o,u=[Object.assign(new r.Token("link_open","a",1),{attrs:[["class",t.permalinkClass],["href",t.permalinkHref(e,r)]].concat(Object.entries(t.permalinkAttrs(e,r)))}),Object.assign(new r.Token("html_block","",0),{content:t.permalinkSymbol}),new r.Token("link_close","a",-1)];t.permalinkSpace&&u[n[!t.permalinkBefore]](Object.assign(new r.Token("text","",0),{content:" "})),(o=r.tokens[i+1].children)[n[t.permalinkBefore]].apply(o,u)},permalinkClass:"header-anchor",permalinkSpace:!0,permalinkSymbol:"¶",permalinkBefore:!1,permalinkHref:function(n){return"#"+n},permalinkAttrs:function(n){return{}}},r});
//# sourceMappingURL=markdownItAnchor.umd.js.map

File diff suppressed because one or more lines are too long

81
node_modules/markdown-it-anchor/package.json generated vendored Normal file
View File

@@ -0,0 +1,81 @@
{
"_args": [
[
"markdown-it-anchor@5.3.0",
"J:\\Github\\CURD-TS"
]
],
"_development": true,
"_from": "markdown-it-anchor@5.3.0",
"_id": "markdown-it-anchor@5.3.0",
"_inBundle": false,
"_integrity": "sha1-1Ums1khWqOzRvqWDZe84Xv+6x0Q=",
"_location": "/markdown-it-anchor",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "markdown-it-anchor@5.3.0",
"name": "markdown-it-anchor",
"escapedName": "markdown-it-anchor",
"rawSpec": "5.3.0",
"saveSpec": null,
"fetchSpec": "5.3.0"
},
"_requiredBy": [
"/vitepress"
],
"_resolved": "http://192.168.250.101:4873/markdown-it-anchor/-/markdown-it-anchor-5.3.0.tgz",
"_spec": "5.3.0",
"_where": "J:\\Github\\CURD-TS",
"bugs": {
"url": "https://github.com/valeriangalliat/markdown-it-anchor/issues"
},
"dependencies": {},
"description": "Header anchors for markdown-it.",
"devDependencies": {
"markdown-it": "^10.0.0",
"markdown-it-attrs": "^3.0.1",
"microbundle": "^0.12.0",
"standard": "^14.3.1"
},
"files": [
"README.md",
"UNLICENSE",
"dist/*",
"runkit.js"
],
"homepage": "https://github.com/valeriangalliat/markdown-it-anchor",
"keywords": [
"markdown",
"markdown-it",
"markdown-it-plugin",
"header",
"anchor"
],
"license": "Unlicense",
"main": "dist/markdownItAnchor.js",
"mangle": {
"regex": "^_"
},
"module": "dist/markdownItAnchor.mjs",
"name": "markdown-it-anchor",
"peerDependencies": {
"markdown-it": "*"
},
"repository": {
"type": "git",
"url": "git+https://github.com/valeriangalliat/markdown-it-anchor.git"
},
"runkitExampleFilename": "runkit.js",
"scripts": {
"build": "microbundle",
"dev": "microbundle watch",
"lint": "standard index.js",
"prepublish": "npm test",
"test": "npm run lint && node test"
},
"source": "index.js",
"unpkg": "dist/markdownItAnchor.umd.js",
"version": "5.3.0"
}

22
node_modules/markdown-it-anchor/runkit.js generated vendored Normal file
View File

@@ -0,0 +1,22 @@
const md = require('markdown-it')()
const anchor = require('markdown-it-anchor')
md.use(anchor, {
level: 1,
// slugify: string => string,
permalink: false,
// renderPermalink: (slug, opts, state, permalink) => {},
permalinkClass: 'header-anchor',
permalinkSymbol: '¶',
permalinkBefore: false
})
const src = `# First header
Lorem ipsum.
## Next section!
This is totaly awesome.`
console.log(md.render(src))