Closed thooyork closed 2 months ago
I tried switching to marked-highlight
by deleting https://github.com/fumiX/fuBlog/blob/1c23e7ba3ede0021c253d5e0c4fdd9c442ff37de/common/src/markdown-converter-common.ts#L119-L121 in favour of adding
import { markedHighlight } from "marked-highlight";
…
marked.use(
markedHighlight({
highlight: function (code, lang) {
return highlightjs.highlightAuto(code).value;
},
}),
);
after this line https://github.com/fumiX/fuBlog/blob/1c23e7ba3ede0021c253d5e0c4fdd9c442ff37de/common/src/markdown-converter-common.ts#L110
But I always get this error:
../node_modules/marked-highlight/src/index.d.ts(68,82): error TS2694: Namespace '"/home/username/path-to-project/node_modules/@types/marked/index"' has no exported member 'MarkedExtension'.
../node_modules/marked-highlight/src/index.d.ts(76,83): error TS2694: Namespace '"/home/username/path-to-project/node_modules/@types/marked/index"' has no exported member 'MarkedExtension'.
../node_modules/marked-highlight/src/index.d.ts(86,23): error TS2694: Namespace '"/home/username/path-to-project/node_modules/@types/marked/index"' has no exported member 'MarkedExtension'.
highlight is deprecated: marked(): highlight and langPrefix parameters are deprecated since version 5.0.0, should not be used and will be removed in the future. Instead use https://www.npmjs.com/package/marked-highlight.