# Pasting from Docusaurus breaks code formatting blocks

**URL:** https://meta.discourse.org/t/pasting-from-docusaurus-breaks-code-formatting-blocks/412919
**Category:** Bug
**Created:** [September 21, 2026, 1:49pm UTC](https://meta.discourse.org/t/pasting-from-docusaurus-breaks-code-formatting-blocks/412919 "2026-09-21T13:49:20Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![msohm](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/msohm/32/379494_2.png) [@msohm](https://meta.discourse.org/u/msohm)
#### Post date: [September 21, 2026, 1:49pm UTC](https://meta.discourse.org/t/pasting-from-docusaurus-breaks-code-formatting-blocks/412919/1 "2026-09-21T13:49:20Z")

</div>

The editor breaks the format when pasting text that has code formatting blocks from web sites created with [Docusaurus](https://docusaurus.io/). Instead of the entire block being encapsulated by ````` , there is a closing ```` ` after the first line and each other line in the code block is prefixed and appended with ` ``. It also puts an empty line in between in line in the code block.

Here’s an example of how a paste looks like of this section: [Create a doc | Docusaurus](https://docusaurus.io/docs/create-doc#document-id) Note how the code blocks are now individual lines instead of a continuous code block. This occurs with any site I’ve tested that’s built with Docusaurus, not just their own site.

* * *

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`.

```plaintext
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`.

```plaintext
---

```

`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.

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [September 21, 2026, 2:32pm UTC](https://meta.discourse.org/t/pasting-from-docusaurus-breaks-code-formatting-blocks/412919/2 "2026-09-21T14:32:22Z")

</div>

this happens with _raw_ pastes from GitHub Markdown too FYI

Even in Markdown mode …

(if I paste these into Notepad there are no backticks - so feels like Discourse is adding them)
