We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6d7d33d commit 4fa29aeCopy full SHA for 4fa29ae
packages/doxdox-renderer-dash/src/index.ts
@@ -21,15 +21,10 @@ import { Doc, Method } from 'doxdox-core';
21
const md = new MarkdownIt({
22
html: true,
23
linkify: true,
24
- highlight: function (str, lang) {
25
- if (lang && hljs.getLanguage(lang)) {
26
- try {
27
- return hljs.highlight(str, { language: lang }).value;
28
- } catch (_) {}
29
- }
30
-
31
- return '';
32
+ highlight: str =>
+ `<div class="bg-light p-3">${
+ hljs.highlight(str, { language: 'javascript' }).value
+ }</div>`
33
});
34
35
const renderMethod = (doc: Doc, method: Method) => `<!DOCTYPE html>
0 commit comments