vscode
vscode copied to clipboard
Caption in @example tag in JSDoc Previewer does not allow line breaks
Type: Bug
- Write a JSDoc with an
@exampletag and innercaptionelement. - Include a line break inside the caption tag.
- Activate the JSDoc Previewer.
This is an issue for longer captions where line breaks are included in the code editor for readability. I would expect the line breaks to be ignored when previewed.
Code Snippet:
declare interface TestInterface {
/**
* This is a test.
* @example <caption>This is on one line.</caption>
* let a = 0;
* @example <caption>This is on
* two lines.</caption>
* let b = 1;
*/
testProperty: string;
}
VS Code version: Code 1.106.3 (bf9252a2fb45be6893dd8870c0bf37e2e1766d61, 2025-11-25T22:28:18.024Z) OS version: Windows_NT x64 10.0.22631 Modes:
System Info
| Item | Value |
|---|---|
| CPUs | 13th Gen Intel(R) Core(TM) i7-13800H (20 x 2918) |
| GPU Status | 2d_canvas: enabled direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled multiple_raster_threads: enabled_on opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok skia_graphite: disabled_off trees_in_viz: disabled_off video_decode: enabled video_encode: enabled vulkan: disabled_off webgl: enabled webgl2: enabled webgpu: enabled webnn: disabled_off |
| Load (avg) | undefined |
| Memory (System) | 31.69GB (14.14GB free) |
| Process Argv | --crash-reporter-id 2d303741-3c9c-4fba-9e95-a8d985eb0e5f |
| Screen Reader | no |
| VM | 0% |
Extensions (5)
| Extension | Author (truncated) | Version |
|---|---|---|
| csharp | ms- | 2.100.11 |
| vscode-dotnet-runtime | ms- | 3.0.0 |
| live-server | ms- | 0.4.16 |
| vscode-xml | red | 0.29.0 |
| vscode-yaml | red | 1.19.1 |
A/B Experiments
vsliv368:30146709
binariesv615:30325510
nativeloc1:31344060
dwcopilot:31170013
dwoutputs:31242946
copilot_t_ci:31333650
e5gg6876:31282496
pythonrdcb7:31342333
6518g693:31334701
aj953862:31281341
nes-set-on:31340697
6abeh943:31336334
cloudbuttont:31379625
todos-1:31405332
3efgi100_wstrepl:31403338
trigger-command-fix:31379601
auto_model_enabled:31385282
use-responses-api:31390855
defaultusage:31403421
d5i5i512:31428709
ec5jj548:31422691
terminalsuggestenabled:31431119
cp_cls_c_966_ss:31426491
defaultvisibility:31426295
expandedtokens:31427242
c0683394:31419495
478ah919:31426797
fa76a614:31426880
cp_jb_t_lixleitest:31428973
h0hdh950:31428394