-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auto-indenting Console requests converts triple-quoted strings to escaped quotes #44729
Comments
Pinging @elastic/es-ui |
@cjcenizal Looking at the code on this, it looks like this behaviour may be a feature not a bug 😅 . That is if you've formatted it once, and format it again you should be seeing
The idea probably being that if you want to have the body in a format you can paste into a non-triple quote friendly environment you can. If this is something we want to change (I do find this toggling a bit strange tbh) then perhaps we can discuss some alternative behaviour that would work best? Are you think de-indent but keep the |
@cjcenizal After messing around with this a bit I see that I misunderstood what you meant. The indentation toggle is something else - I was able to reproduce what you were describing though :). Including this fix here: #44646 |
@bleskes Do you know if the behavior described in this PR description is intended? |
that sounds broken to me. I did have some minimums for automatically using |
Something else is broken the other way around: Except when I use a different string, starting and ending with an escaped double quote:
auto-indents gives me here:
Which generates an error, as we now have something starting and ending with four quotes, which is interpreted as a string But I haven't tested this with the new patch yet. |
Hi @EmilBode thanks for reporting this! What you've described is a separate issue unfortunately and I could reproduce this in current master. I'll open another issue to make tracking this a bit cleaner. |
To reproduce, enter this input:
Auto-indent this request and it will be converted to:
Ideally, triple-quoted strings should remain triple-quoted.
The text was updated successfully, but these errors were encountered: