Skip to content

Commit b0af56a

Browse files
committed
Default?
1 parent 490943e commit b0af56a

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

docs/.vuepress/theme/util/markdown.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export function getHeaderText(token) {
1+
function getHeaderText(token) {
22
// Get the full text of the token (including any children, if it had formatting), and do a crude entity conversion:
33
let text = decodeEntities(token.content);
44

@@ -11,7 +11,7 @@ export function getHeaderText(token) {
1111
return text;
1212
}
1313

14-
export function decodeEntities(str) {
14+
function decodeEntities(str) {
1515
const entityMap = {
1616
'&lt;': '<',
1717
'&gt;': '>',
@@ -24,7 +24,7 @@ export function decodeEntities(str) {
2424
});
2525
}
2626

27-
export function renderPermalink(slug, opts, state, idx) {
27+
function renderPermalink(slug, opts, state, idx) {
2828
// Get text of current header:
2929
const headerText = getHeaderText(state.tokens[idx + 1]);
3030

@@ -47,3 +47,9 @@ export function renderPermalink(slug, opts, state, idx) {
4747
// Place at the beginning of the heading tag:
4848
state.tokens[idx + 1].children.unshift(...linkTokens);
4949
}
50+
51+
export default {
52+
getHeaderText,
53+
decodeEntities,
54+
renderPermalink,
55+
};

0 commit comments

Comments
 (0)