Skip to content

Commit 1f6c254

Browse files
committed
trying to fix usage docs
1 parent c3253e0 commit 1f6c254

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎scripts/apiDocgen.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ function generateUsage(usage) {
8282
let str = `<h2>Usage</h2>${r}`;
8383
str += `<code-switcher languages="${Object.keys(usage).join(',')}">${r}`;
8484
for (const version in usage) {
85-
str += `<div slot="${version}" markdown="1">\r\n`;
85+
str += `<div slot="${version}" markdown="1">${r}`;
8686
str += usage[version];
87-
str += `</div>${r}`;
87+
str += `${r}</div>${r}`;
8888
}
8989
return str + `<code-switcher>${r}`;
9090
}

‎src/markdown.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export interface MarkedStruc {
1212
body: string;
1313
}
1414

15-
const toCodeBlock = (code: string, lang = '') =>
15+
export const toCodeBlock = (code: string, lang = '') =>
1616
`<code-block language="${lang}">${hljs.highlightAuto(code, [lang]).value}</code-block>`;
1717

1818
const toPreviewBlock = (code: string, lang = '') => `

0 commit comments

Comments
 (0)