@vuepress/markdown
Advanced tools
Comparing version 2.0.0-beta.19 to 2.0.0-beta.20
@@ -29,5 +29,8 @@ "use strict"; | ||
slugify: utils_1.slugify, | ||
permalink: true, | ||
permalinkBefore: true, | ||
permalinkSymbol: '#', | ||
permalink: plugins_1.anchorPlugin.permalink.ariaHidden({ | ||
class: 'header-anchor', | ||
symbol: '#', | ||
space: true, | ||
placement: 'before', | ||
}), | ||
...anchor, | ||
@@ -34,0 +37,0 @@ }); |
@@ -1,62 +0,4 @@ | ||
import type { PluginWithOptions } from 'markdown-it'; | ||
import State = require('markdown-it/lib/rules_core/state_core'); | ||
import Token = require('markdown-it/lib/token'); | ||
/** | ||
* Options for markdown-it-anchor | ||
* | ||
* @see https://github.com/valeriangalliat/markdown-it-anchor | ||
*/ | ||
export interface AnchorPluginOptions { | ||
/** | ||
* Minimum level to apply anchors on or array of selected levels | ||
* | ||
* @default 1 | ||
*/ | ||
level?: number | number[]; | ||
/** | ||
* A custom slugification function | ||
*/ | ||
slugify?: (str: string) => string; | ||
/** | ||
* Whether to add permalinks next to titles | ||
* | ||
* @default false | ||
*/ | ||
permalink?: boolean; | ||
/** | ||
* A custom permalink rendering function | ||
*/ | ||
renderPermalink?: (slug: string, opts: AnchorPluginOptions, state: State, tokenIndex: number) => void; | ||
/** | ||
* The class of the permalink anchor | ||
*/ | ||
permalinkClass?: string; | ||
/** | ||
* Place space between the header text and the permalink anchor | ||
*/ | ||
permalinkSpace?: boolean; | ||
/** | ||
* The symbol in the permalink anchor | ||
*/ | ||
permalinkSymbol?: string; | ||
/** | ||
* Place the permalink before the title | ||
*/ | ||
permalinkBefore?: boolean; | ||
/** | ||
* A custom permalink `href` rendering function | ||
*/ | ||
permalinkHref?: (slug: string, state: State) => string; | ||
/** | ||
* A custom permalink attributes rendering function | ||
*/ | ||
permalinkAttrs?: (slug: string, state: State) => Record<string, string>; | ||
/** | ||
* Called with token and info after rendering | ||
*/ | ||
callback?: (token: Token, opts: { | ||
slug: string; | ||
title: string; | ||
}) => void; | ||
} | ||
export declare const anchorPlugin: PluginWithOptions<AnchorPluginOptions>; | ||
import * as anchorPlugin from 'markdown-it-anchor'; | ||
import type { AnchorOptions } from 'markdown-it-anchor'; | ||
export declare type AnchorPluginOptions = AnchorOptions; | ||
export { anchorPlugin }; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.anchorPlugin = void 0; | ||
const rawAnchorPlugin = require("markdown-it-anchor"); | ||
exports.anchorPlugin = rawAnchorPlugin; | ||
const anchorPlugin = require("markdown-it-anchor"); | ||
exports.anchorPlugin = anchorPlugin; |
@@ -1,4 +0,3 @@ | ||
export * from './parseEmoji'; | ||
export * from './resolveHeadersFromTokens'; | ||
export * from './resolveTitleFromToken'; | ||
export * from './slugify'; |
@@ -13,5 +13,4 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__exportStar(require("./parseEmoji"), exports); | ||
__exportStar(require("./resolveHeadersFromTokens"), exports); | ||
__exportStar(require("./resolveTitleFromToken"), exports); | ||
__exportStar(require("./slugify"), exports); |
{ | ||
"name": "@vuepress/markdown", | ||
"version": "2.0.0-beta.19", | ||
"version": "2.0.0-beta.20", | ||
"description": "Markdown package of VuePress", | ||
@@ -30,6 +30,6 @@ "keywords": [ | ||
"@types/markdown-it": "^12.0.2", | ||
"@vuepress/shared": "2.0.0-beta.19", | ||
"@vuepress/utils": "2.0.0-beta.19", | ||
"@vuepress/shared": "2.0.0-beta.20", | ||
"@vuepress/utils": "2.0.0-beta.20", | ||
"markdown-it": "^12.0.6", | ||
"markdown-it-anchor": "^7.1.0", | ||
"markdown-it-anchor": "^8.0.4", | ||
"markdown-it-emoji": "^2.0.0", | ||
@@ -41,3 +41,3 @@ "mdurl": "^1.0.1" | ||
}, | ||
"gitHead": "3193f78a234e9c8fb5652a21951420158c2320f6" | ||
"gitHead": "5fc351d88f9c8e9f6c6af18674aebfd6aafd97f9" | ||
} |
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
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
69792
82
1901
+ Added@vuepress/shared@2.0.0-beta.20(transitive)
+ Added@vuepress/utils@2.0.0-beta.20(transitive)
+ Addedmarkdown-it-anchor@8.6.7(transitive)
- Removed@vuepress/shared@2.0.0-beta.19(transitive)
- Removed@vuepress/utils@2.0.0-beta.19(transitive)
- Removedmarkdown-it-anchor@7.1.0(transitive)
Updatedmarkdown-it-anchor@^8.0.4