Skip to content
Bug reportNov 23, 2026· 0:24· 11 views

Scalar API reference: code blocks in requestBody descriptions lose syntax highlighting

0:24 total

Comments · 0

Be the first to comment.

Bug reportby SceneRecap AI

lowAPI reference markdown rendering for requestBody and schema property descriptions. These are likely rendered by a different markdown component, or a 'plain/compact' mode that skips the code highlighting plugin used for operation descriptions.
os: macOSapp: Scalar Sandboxdpr: 1locale: en-USbrowser: Chromium 151.0.7922.34document: OpenAPI 3.1.2 'Hello World' (/e/T1C4Z, /p/T1C4Z)timezone: Europe/Berlinviewport: 1280x720

Repro steps

  1. 1.Open the Scalar Sandbox editor with an OpenAPI 3.1.2 document. Put a '```js\nlet a = 5;\n```' code block in three descriptions: the POST / operation description, the requestBody description and the 'message' schema property description.
  2. 2.Click the 'Preview' button.
  3. 3.Click the 'POST /' link in the sidebar.
  4. 4.Compare the three 'let a = 5;' code blocks in the operation section.

Expected

All three fenced js code blocks render with syntax highlighting. The operation, requestBody and message property descriptions should look the same, because the markdown is identical.

Actual

Only the operation description code block is highlighted, with purple 'let' and orange '5'. The requestBody block under 'The request payload.' and the message property block under 'The message to send.' show 'let a = 5;' in plain gray monospace text.

Evidence

visualControl case, works: the operation description code block 'let a = 5;' under 'Accepts a simple request.' renders with syntax coloring (purple 'let', orange '5').
visualBody section: the code block under 'The request payload.' renders 'let a = 5;' in plain gray text with no highlighting.
visual'message string' property: the code block under 'The message to send.' renders 'let a = 5;' in plain gray text with no highlighting.
visualAfter scrolling, the requestBody and message code blocks are still unhighlighted. The operation block is still highlighted.
visualAfter scrolling back up, the same difference is still visible.
visualIn the Edit view, the source shows identical '```js\nlet a = 5;\n```' markdown in the operation, requestBody and message descriptions. The side preview highlights the operation block.
consoleWarnings 'Document not found in configList' and 'scalar:update-references-config event has been deprecated, please use scalarInstance.updateConfiguration instead.' appear on load. They are probably unrelated.
consoleThe deprecation warning for scalar:update-references-config repeats when switching to Preview.
Issue markdown (copy-paste ready)
## Summary
Fenced code blocks in `requestBody.description` and schema property descriptions render without syntax highlighting. The same block in the operation `description` is highlighted.

## Environment
- Chromium 151.0.7922.34, macOS
- Viewport 1280x720, dpr 1
- Scalar Sandbox (/e/T1C4Z, /p/T1C4Z), OpenAPI 3.1.2

## Steps to reproduce
1. Create an OpenAPI 3.1.2 document. Use the same markdown, '```js\nlet a = 5;\n```', in three descriptions: the POST / operation description, the requestBody description and the `message` property description (0.0s).
2. Click **Preview** (2.7s).
3. Click **POST /** in the sidebar (6.5s).
4. Compare the three code blocks (7.0s).

## Expected
All three js code blocks are syntax highlighted.

## Actual
- Operation description block: highlighted (purple `let`, orange `5`). This is the control case and it works.
- Body block under "The request payload.": plain gray text, no highlighting.
- `message` property block under "The message to send.": plain gray text, no highlighting.

The difference persists after scrolling (13.0s, 17.0s, 23.0s).

## Evidence
- 7.0s: visual comparison shows the operation block highlighted, and the requestBody and property blocks unhighlighted.
- 0.0s: the editor source shows identical markdown in all three descriptions.
- Console (0.0s, 2.9s): `Document  not found in configList` and `scalar:update-references-config event has been deprecated...`. These warnings are probably unrelated.

## Suggested area
The markdown renderer used for requestBody and schema property descriptions. It may skip the syntax highlighting step used for operation descriptions.

*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 →
Scalar API reference: code blocks in requestBody descriptions lose syntax highlighting · SceneRecap