The editor freezes when using markdown and large text

Hello,

With this configuration of the editor, the page freezes when inserting content.

import { EditorView, basicSetup } from "codemirror";
import { markdown, markdownLanguage } from "@codemirror/lang-markdown";

new EditorView({
  extensions: [
    basicSetup,
    markdown({
      base: markdownLanguage
    })
  ],
  parent: document.body
});

Playground: codesandbox.io
Text content: gist.github.com

If you delete base: markdown Language, pasting works fine. But I expect that when the option is enabled, there will be no hovering. How can I fix it? What if you don’t try to parse long lines without gaps?

That was a quadratic bit of parsing complexity in the Autolink extension. This patch should help:

1 Like