Skip to content
Bug reportAug 27, 2026· 0:24· 13 views

BlockNote: typing ``` then Enter creates a code block with empty language, crashing the highlighter and corrupting the cursor

0:24 total

Comments · 0

Be the first to comment.

Bug reportby SceneRecap AI

higheditor / code-block plugin syntax parser
os: macOSdpr: 1browser: Chromium 151.0.7922.34viewport: 1280x720

Repro steps

  1. 1.Click into the BlockNote editor text area
  2. 2.Type '```' followed by Enter without specifying a language
  3. 3.Type text and navigate or press Enter within the corrupted block

Expected

Typing '```' and pressing Enter creates a code block with a default language (or plaintext) without console errors, allowing normal editing.

Actual

An empty language string is passed to the syntax highlighter causing 'Language is not supported.' console errors, unformatted raw text rendering, and eventual 'Position 190 out of range' editor crashes.

Evidence

consoleConsole error logged: 'Language is not supported.'
visualThe input '```' remains unformatted as plain backticks rather than converting into an initialized code block
consoleConsole error logged: 'Language is not supported.' on subsequent Enter press
consoleConsole error logged: 'Position 190 out of range' indicating corrupted document/cursor position state
Issue markdown (copy-paste ready)
## Summary
When creating a code block using markdown shortcut triple backticks (`` ` ``) followed immediately by `Enter` without specifying an explicit language tag, BlockNote attempts to initialize the highlighter with an empty language string. This triggers syntax highlighter exceptions (`Language  is not supported.`) and corrupts the internal editor position state (`Position 190 out of range`).

## Steps to Reproduce
1. Open the BlockNote editor demo.
2. Click into the editor.
3. Type ``` followed immediately by `Enter`.
4. Type additional text or press `Enter` / navigation keys.

## Expected Behavior
The markdown trigger should create a code block defaulting to plaintext or a default language fallback without runtime exceptions.

## Actual Behavior
- Console error: `Language  is not supported.`
- The code block fails to render properly, displaying unformatted backticks.
- Subsequent cursor movement and edits result in `Position 190 out of range` error.

*Recorded with SceneRecap.*

This report was written by SceneRecap from a screen recording. Try SceneRecap free

Turn a screen recording into a bug report like this one.

Repro steps, expected vs actual and the console and network evidence, each with a timestamp. On every plan, Free included.

Try SceneRecap free →