Skip to content

RC3: how to upgrade existing markdown renderer overrides v4->v5? #2680

Closed

Description

@thediveo

Description

With v4 I'm using the following to implement footnote handling in docsify:

window.$docsify = {
  // ...
  markdown: function (marked, renderer) {
        marked.setOptions({
          smartypants: true,
          renderer: Object.assign(renderer, {
            paragraph(text) {
              return marked.Renderer.prototype.paragraph.apply(null, [
                interpolateReferences(interpolateFootnotes(text))
            ])},
            text(text) {
              return marked.Renderer.prototype.text.apply(null, [
                interpolateReferences(interpolateFootnotes(text))
            ])},
          }),
        })
        return marked
      },
  // ...
}

Expected behavior

Modified markdown rendering functionality to handle footnotes.

Actual behavior

v4 markdown handling configuration gets ignored in v5; the renderer methods get ignored.

Steps to reproduce

.

Environment

How to migrate this from v4->v5?

Additional Information

  • Bug still occurs when all/other plugins are disabled?

Activity

  1. added a commit that references this issue on Mar 30, 2026
    586fbb0
  2. sy-records commented on Apr 1, 2026

    @sy-records
    Member

    You'll need to use walkTokens or a plugin.

    I've tested the marked footnote plugin, but there are routing issues in Docsify, so you can use my plugin: https://github.com/sy-records/docsify-footnotes

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Triagebugconfirmed as a bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions