asciidoctor-vscode icon indicating copy to clipboard operation
asciidoctor-vscode copied to clipboard

Whitespace inside inline code is collapsed in preview

Open Enyium opened this issue 6 months ago • 0 comments
trafficstars

Write the following in an .adoc file, and run the VS Code command "AsciiDoc: Open Preview to the Side".

foo `bar     baz`     qux

foo `+bar     baz+`     qux

Only the whitespace between "baz" and "qux" should be collapsed, but the whitespace between "bar" and "baz" is mistakenly also collapsed. When instead editing an .adoc file on GitHub and letting it render a preview on the website, the whitespace between "bar" and "baz" correctly isn't collapsed.

When selecting the space vs. another monospace character, the selections are also of different width, although I'd expect them to have the same width:

Image

EDIT:

The following bug may be related: When writing foo `` bar `` baz, the preview in VS Code doesn't show the space to the left of bar. The space to the right of bar is shown, but the space after the inline code and before baz is in return discarded. Again, the GitHub preview works as expected (all four spaces shown).


System info:

Version: 1.99.3 (user setup)
Commit: 17baf841131aa23349f217ca7c570c76ee87b957
Date: 2025-04-15T23:18:46.076Z
Electron: 34.3.2
ElectronBuildId: 11161073
Chromium: 132.0.6834.210
Node.js: 20.18.3
V8: 13.2.152.41-electron.0
OS: Windows_NT x64 10.0.[...]

Extension info:

  • Identifier: asciidoctor.asciidoctor-vscode
  • Version: 3.4.2

Enyium avatar May 01 '25 18:05 Enyium