-
-
Notifications
You must be signed in to change notification settings - Fork 118
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
the option doubleQuotedMinMultiLineLength for yaml.stringify is not working as intended #512
Labels
docs
Documentation should be improved
Comments
Could you provide JS code reproducing the results you think are wrong? |
Ah, the docs on the option should be adjusted a bit to clarify that the option is for (italics is currently missing):
To get the results you want, you'll want to also set |
eemeli
added
docs
Documentation should be improved
and removed
bug
Something isn't working
labels
Dec 20, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
I am encountering an issue with the
doubleQuotedMinMultiLineLength
option in the yaml.stringify function that doesn't seem to behave as expected. The option in yaml.stringifydoubleQuotedMinMultiLineLength
is supposed to set min length of the double quoted string that should not be seperated to multiline with\
. This is'nt an issue for single quoted strings or strings with no quotes in YAML Map representation.To Reproduce
try to parse a yaml doc where a double quoted string is present as a YAMLMap and stringify it with
options = {doubleQuotedMinMultiLineLength: x}
, regardless of what x is the split is always happening from 76th character even though in the docs it is by default 40.Expected behaviour
A clear and concise description of what you expected to happen.
I expect the doubleQuotedStrings present in the YAMLMap to be split to multiline with escape character
\
only after the length passed in as options. if theoptions = {doubleQuotedMinMultiLineLength: 2}
it should split to multiline after 2 characters and if its 400 it should split into multiline with escape character after 400 characters.Versions (please complete the following information):
yaml
: [e.g. 1.10.0 or 2.0.0-2]Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: