Pasting from Docusaurus breaks code formatting blocks

Can you share an example? I couldn’t reproduce it with some sources I tried.

The issue with the Docusaurus output is that its code block uses one div per line, which wasn’t really expected. I merged a fix today.

Here’s the output of the same copy&pasted selection:


Every document has a unique id. By default, a document id is the name of the document (without the extension) relative to the root docs directory.

For example, the ID of greeting.md is greeting, and the ID of guide/hello.md is guide/hello.

website # Root directory of your site
└── docs
   ├── greeting.md
   └── guide
      └── hello.md

However, the last part of the id can be defined by the user in the front matter. For example, if guide/hello.md’s content is defined as below, its final id is guide/part1.

---
id: part1
---

Lorem ipsum

The ID is used to refer to a document when hand-writing sidebars, or when using docs-related layout components or hooks.

2 Likes