Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove console warnings of deprecated dependencies #79

Closed
thooyork opened this issue May 17, 2023 · 1 comment · Fixed by #84
Closed

Remove console warnings of deprecated dependencies #79

thooyork opened this issue May 17, 2023 · 1 comment · Fixed by #84
Labels
enhancement New feature or request

Comments

@thooyork
Copy link
Contributor

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.

@thooyork thooyork added the enhancement New feature or request label May 17, 2023
@floscher
Copy link
Contributor

I tried switching to marked-highlight by deleting

highlight: function (code, lang) {
return highlightjs.highlightAuto(code).value;
},
in favour of adding

import { markedHighlight } from "marked-highlight";

marked.use(
  markedHighlight({
    highlight: function (code, lang) {
      return highlightjs.highlightAuto(code).value;
    },
  }),
);

after this line

marked.use(MarkdownConverter.rendererExtension);

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'.

@floscher floscher linked a pull request Jun 20, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants