Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

JSX semantic highlight wrong for non-nested self-closing components #89224

Closed
IllusionMH opened this issue Jan 24, 2020 · 0 comments
Closed

JSX semantic highlight wrong for non-nested self-closing components #89224

IllusionMH opened this issue Jan 24, 2020 · 0 comments
Assignees
Labels
semantic-tokens Semantic tokens issues typescript Typescript support issues
Milestone

Comments

@IllusionMH
Copy link
Contributor

IllusionMH commented Jan 24, 2020

Issue Type: Bug

Both DiscountedItemPrice and RegularItemPrice have same definitions (arrow function above), however if I nest DiscountedItemPrice into div it has proper color for custom component.

const ItemPrice = (props) => {
    return props.discountAmount > -1
        ? <div><DiscountedItemPrice { ...props } /></div>
        : <RegularItemPrice { ...props } />;
};
Screen: Tokens for DiscountedItemPrice

image

Screen: Tokens for RegularItemPrice

image

However it will be displayed fine if I make it not self-closing

Screen: Tokens for RegularItemPrice (not self-closing)

image

/cc @aeschli

VS Code version: Code - Insiders 1.42.0-insider (f3dbcea, 2020-01-24T05:38:14.538Z)
OS version: Windows_NT x64 10.0.18363

System Info
Item Value
CPUs Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz (12 x 3192)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: enabled
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off_ok
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 31.72GB (13.52GB free)
Process Argv
Screen Reader no
VM 0%
Extensions: none
@aeschli aeschli added this to the January 2020 milestone Jan 27, 2020
@aeschli aeschli added typescript Typescript support issues semantic-tokens Semantic tokens issues labels Jan 27, 2020
@vscodebot vscodebot bot locked and limited conversation to collaborators Mar 12, 2020
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
semantic-tokens Semantic tokens issues typescript Typescript support issues
Projects
None yet
Development

No branches or pull requests

2 participants