Skip to content

Commit 490943e

Browse files
committed
Explicitly export each function?
1 parent 15f7696 commit 490943e

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

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

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function getHeaderText(token) {
1+
export 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 @@ function getHeaderText(token) {
1111
return text;
1212
}
1313

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

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

@@ -47,8 +47,3 @@ 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 {
52-
getHeaderText,
53-
renderPermalink,
54-
};

0 commit comments

Comments
 (0)