You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the screenshots in the wallaby documentation, this example of an inspected string value should yield a multiline string rather than a JS string literal.
I.e. String are not represented correctly in the inspectors. Strings should be represented without escape sequences. If I press the copy button, my clipboard will receive the string in JS/JSON notation including the quotes and escape representations rather than the raw string. Is it possible to configure? As a long time wallabyjs user, I am quite sure I didn't use to have it like this.
The text was updated successfully, but these errors were encountered:
Starcounter-Jack
changed the title
Strings are not represented correctly
Strings are not represented correctly in inspectors
Apr 19, 2024
According to the screenshots in the wallaby documentation, this example of an inspected string value should yield a multiline string rather than a JS string literal.
This behavior is expected.
Wallaby has heuristics for displaying the string differently depending on its size.
Strings will always will represented with escape sequences (e.g. \n) regardless of the string length.
Shorter strings are displayed in a single line, while longer strings are separated across multiple lines when there is not enough horizontal real-estate. For example:
If I press the copy button, my clipboard will receive the string in JS/JSON notation including the quotes and escape representations rather than the raw string. Is it possible to configure? As a long time wallabyjs user, I am quite sure I didn't use to have it like this.
The actions displayed in the hover were added in July 2023. The copy button for the hover has always functioned like this. The behavior is different vs. when you use the Copy Value command, which you may have used in the past (before the hover action was available).
When you use the Copy Value command, the string will be copied to your clipboard without any escape characters.
When you use the copy action on the hover, the string will be copied to your clipboard as it is displayed (i.e. with the escape characters). This was an intentional design choice to make sure that what's being copied is what we are currently displaying.
Right now, we don't have an option to control the behavior of hover copy; we will repurpose this issue as a feature request for this.
smcenlly
changed the title
Strings are not represented correctly in inspectors
Feature Request: add option to control VS Code hover copy behavior to copy string text value instead of JavaScript string representation
Apr 19, 2024
Wallaby 1.0.375
VS Code 1.88.1
MacOS 14.1.1
According to the screenshots in the wallaby documentation, this example of an inspected string value should yield a multiline string rather than a JS string literal.
I.e. String are not represented correctly in the inspectors. Strings should be represented without escape sequences. If I press the copy button, my clipboard will receive the string in JS/JSON notation including the quotes and escape representations rather than the raw string. Is it possible to configure? As a long time wallabyjs user, I am quite sure I didn't use to have it like this.
The text was updated successfully, but these errors were encountered: