Add code snippets(temporary)

pull/8253/head
Puru Vijay 4 years ago
parent 7ec748291b
commit c93fa8f6ad

@ -19,8 +19,9 @@ const base = '../../site/content/docs/';
const languages = { const languages = {
bash: 'bash', bash: 'bash',
env: 'bash', env: 'bash',
html: 'markup', html: 'html',
svelte: 'svelte', svelte: 'svelte',
sv: 'svelte',
js: 'javascript', js: 'javascript',
css: 'css', css: 'css',
diff: 'diff', diff: 'diff',
@ -86,6 +87,9 @@ export async function read_file(file) {
version_class = 'js-version'; version_class = 'js-version';
} }
// TODO: Replace later
html = highlighter.codeToHtml(source, { lang: languages[language] });
// if (language === 'dts') { // if (language === 'dts') {
// // @ts-ignore // // @ts-ignore
// html = renderCodeToHTML(source, 'ts', { twoslash: false }, {}, highlighter); // html = renderCodeToHTML(source, 'ts', { twoslash: false }, {}, highlighter);

Loading…
Cancel
Save