Skip to content

Fix Missing Closing Backtick When Exporting Code Blocks #231

Description

@petertzy

A new issue has been found.

Steps to reproduce

On the editor page, enter the following content:

@tailwind base;
@tailwind components;
@tailwind utilities;

/* Ensure full-height layout */
html, body, #__next {
  height: 100%;
  margin: 0;
}

/* Monaco editor container fix */
.monaco-editor {
  height: 100% !important;
}

After typing the final backtick (`), export the document directly to PDF, DOCX, or HTML.

Actual behavior

The editor automatically drops the final backtick, which causes the exported file to render the code block incorrectly.

Additional observation

If I press Enter immediately after typing the final backtick and then export the document, the backtick is preserved and the code block is rendered correctly.

Please investigate this issue and try to fix it. Thank you.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions