Skip to content

[Dependency Notification] Upgrade marked which may gonna drop support IE11. #1885

Description

@Koooooo-7

Summary

This issues is for tracing marked and related dependencies upgrade.
As per to current incompatible and related dependencies outdated, the marked js upgrade stuff is tough to move on.
For avoiding the vulnerabilities issues, we should upgrade mark js asap.

Update

Kudos to @dzsibi help the upgrade and @paulhibbitts verified this changes.

We update marked.js to 4.2.12 and make some changes to fix the upgrade issue in #1993 .

In case of the unpredicted issue for this change, the parser breaking especially.
Hold this issue thread to trace and collect report of the marked issue.

Breaking

Maybe not support the IE11 from the next release since marked.js removed the support of IE11. 💣


Related PR:
#1503
#1993

Activity

  1. pinned this issue on Sep 17, 2022
  2. dzylikecode commented on Oct 23, 2022

    @dzylikecode

    Will the code help you?

    <script src="https://cdn.jsdelivr.net/npm/marked@4"></script>
    <script>
    let newMarked = marked; // I find that marked will be overwritten by Docsify, so save it before
    window.$docsify={
      markdown: (originMarked, originRenderer) => newMarked.parse // markdown: newMarked.parse
    };
    </script>

    I saw it from upupming/docsify-katex#36. I think replacing 'marked' with 'marked.parse' will help the latest marked work well in Docsify.

    // Docsify library source code
    import {marked.parse as marked} from marked // the newest version
  3. dzylikecode commented on Oct 23, 2022

    @dzylikecode

    I can prove Docsify will use the latest marked to parse markdown because the built-in marked doesn't support the extension, but the newer one does, which helps me to parse math formula

  4. Koooooo-7 commented on Oct 23, 2022

    @Koooooo-7
    MemberAuthor

    Hi @dzylikecode, thx for those info.
    Could you plz take a look at this marked upgrade stuff and make a PR ? thats should help a lot.
    Otherwise we have to jog on somehow until contributors who gonna do us the favor.

  5. dzylikecode commented on Oct 24, 2022

    @dzylikecode

    You know more than me. Professional things should be left to professional people. I just offer what I see to you. 😏 😏 😏

  6. changed the title [-][Dependency] Upgrade marked and related dependencies.[/-] [+][Dependency Notification] Upgrade marked and related dependencies.[/+] on Apr 22, 2023
  7. changed the title [-][Dependency Notification] Upgrade marked and related dependencies.[/-] [+][Dependency Notification] Upgrade marked which may gonna drop support IE11.[/+] on Apr 22, 2023
  8. unpinned this issue on Jun 29, 2023
  9. trusktr commented on Jul 6, 2023

    @trusktr
    Member

    Will the code help you?

    <script src="https://cdn.jsdelivr.net/npm/marked@4"></script>
    <script>
    let newMarked = marked; // I find that marked will be overwritten by Docsify, so save it before
    window.$docsify={
      markdown: (originMarked, originRenderer) => newMarked.parse // markdown: newMarked.parse
    };
    </script>
    

    I saw it from upupming/docsify-katex#36. I think replacing 'marked' with 'marked.parse' will help the latest marked work well in Docsify.

    // Docsify library source code
    import {marked.parse as marked} from marked // the newest version

    That's a nice trick. We should document that trick, perhaps here: https://docsify.js.org/#/configuration?id=markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions