-
-
Notifications
You must be signed in to change notification settings - Fork 775
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
I do I turn off the escaping/quoting about C#
for a name field?
#466
Comments
Dumper has some euristic and tries to minimize quoting/escaping automatically. But it's not ideal. This can be "improved" via PR only. |
@puzrin Can I create PR to control it through options? |
If you can improve existing algorythm - PR will be accepted with high probability. If you need option - it's better discuss it first to save your time (i don't understand why option needed), but note, i'm against "kludges". At first glance, string with |
The Microsoft Docs system doesn't use quotes around characters and phrases that this tool is adding quotes to for escaping. The build system is separated from authoring so the author's don't have to know about escaping or quotes in the same way. I need the markdown to not be changed from the original in order to make use of this tool's dump function. |
This package is about YAML, not something else. Dumper MUST provide guarantee that you can load data back and it will not become broken. So, it tries to not use quoting when possible. But sometime false positives possible because algorythm is not ideal. Just removing quotes everywhere is not acceptable because that will break spec. But you can try to improve existing euristic to reduce false positives. |
@puzrin I meant yaml, sorry, too may formats in my head right now. I'll investigate the spec to see where the limitations are. |
Keep in mind, this parser is focused on speed, it does NOT have AST and does not keep src formatting details. For example, you can write in source "C\#" or "C#", but "\" will be lost after dump if not required. In general, this can not be fixed right without full rewrite. But specific things like quoting can be improved. |
The original TOC looks like:
I want to manipulate the yaml so I change in into JSON with load. Then I check and manipulate (business logic) then I want to dump. The dump adds quotes around the C# which I don't want. Is there an option to turn that off?
href: index.yml
expanded: true
items:
href: what-is-luis.md
The text was updated successfully, but these errors were encountered: