Skip to content

Mermaid code blocks in markdown showing error #21427

Closed
@dvjn

Description

@dvjn

Description

When I create a mermaid code block in a markdown file, error banners are shown on each character input.
Also, in the preview tab, the height of the mermaid diagram is broken.

This is working properly on v1.17 but breaking on dev.

Stacktrace:

22:32:03.497 Uncaught Error: Language id "vs.editor.nullLanguage" is not configured nor known

F@https://try.gitea.io/assets/js/monaco.943e8892.js:135:7465
getLanguageConfiguration@https://try.gitea.io/assets/js/monaco.943e8892.js:135:7221
getLanguageConfiguration@https://try.gitea.io/assets/js/monaco.943e8892.js:154:21355
getWordAtPosition@https://try.gitea.io/assets/js/monaco.943e8892.js:154:21664
getWordAtPosition@https://try.gitea.io/assets/js/monaco.943e8892.js:163:10576
Ue@https://try.gitea.io/assets/js/monaco.943e8892.js:251:5156
./node_modules/monaco-editor/esm/vs/editor/contrib/inlineCompletions/browser/ghostText.contribution.js/rt/<@https://try.gitea.io/assets/js/monaco.943e8892.js:251:3900
./node_modules/monaco-editor/esm/vs/editor/contrib/inlineCompletions/browser/ghostText.contribution.js/X/<@https://try.gitea.io/assets/js/monaco.943e8892.js:250:6704
X@https://try.gitea.io/assets/js/monaco.943e8892.js:250:6467
rt@https://try.gitea.io/assets/js/monaco.943e8892.js:251:3856
./node_modules/monaco-editor/esm/vs/editor/contrib/inlineCompletions/browser/ghostText.contribution.js/update/</Kt</<@https://try.gitea.io/assets/js/monaco.943e8892.js:251:525
./node_modules/monaco-editor/esm/vs/editor/contrib/inlineCompletions/browser/ghostText.contribution.js/X/<@https://try.gitea.io/assets/js/monaco.943e8892.js:250:6704
X@https://try.gitea.io/assets/js/monaco.943e8892.js:250:6467
./node_modules/monaco-editor/esm/vs/editor/contrib/inlineCompletions/browser/ghostText.contribution.js/update/</Kt<@https://try.gitea.io/assets/js/monaco.943e8892.js:251:473
T@https://try.gitea.io/assets/js/monaco.943e8892.js:28:79091
./node_modules/monaco-editor/esm/vs/editor/contrib/inlineCompletions/browser/ghostText.contribution.js/update/<@https://try.gitea.io/assets/js/monaco.943e8892.js:251:467
./node_modules/monaco-editor/esm/vs/editor/contrib/inlineCompletions/browser/ghostText.contribution.js/X/<@https://try.gitea.io/assets/js/monaco.943e8892.js:250:6704
X@https://try.gitea.io/assets/js/monaco.943e8892.js:250:6467
update@https://try.gitea.io/assets/js/monaco.943e8892.js:251:345
./node_modules/monaco-editor/esm/vs/editor/contrib/inlineCompletions/browser/ghostText.contribution.js/ve/this.updateSoon<@https://try.gitea.io/assets/js/monaco.943e8892.js:250:10076
doRun@https://try.gitea.io/assets/js/monaco.943e8892.js:28:83100
onTimeout@https://try.gitea.io/assets/js/monaco.943e8892.js:28:83040
    unexpectedErrorHandler https://try.gitea.io/assets/js/monaco.943e8892.js:30
monaco.943e8892.js:30:12

Gitea Version

dev

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

image
image
image

Git Version

No response

Operating System

No response

How are you running Gitea?

Docker Image: gitea/gitea:dev

Database

SQLite

Activity

silverwind

silverwind commented on Oct 12, 2022

@silverwind
Member

Seems this is a bug introduced in Monaco 0.34: microsoft/monaco-editor#2962.

I don't think we can do anything about it until it's fixed upstream, at best, we could filter out this specific error message or downgrade Monaco.

added
type/upstreamThis is an issue in one of Gitea's dependencies and should be reported there
issue/confirmedIssue has been reviewed and confirmed to be present or accepted to be implemented
on Oct 12, 2022
locked and limited conversation to collaborators on May 3, 2023
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

    issue/confirmedIssue has been reviewed and confirmed to be present or accepted to be implementedtype/bugtype/upstreamThis is an issue in one of Gitea's dependencies and should be reported there

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @silverwind@dvjn

      Issue actions

        Mermaid code blocks in markdown showing error · Issue #21427 · go-gitea/gitea