EXILED icon indicating copy to clipboard operation
EXILED copied to clipboard

Make all strings in the config be serialized with single quotes

Open PintTheDragon opened this issue 3 years ago • 4 comments

One issue I've seen is that some people might edit a string in a config, and it creates a parsing error because they forgot to surround it with single quotes. Or, some properties have quotes, while some just don't. I think it would be much better to just not serialize strings without quotes around them (of course, excluding weird yaml stuff like multi-line strings). I'm not too sure how this can be done in YamlDotNet though.

So essentially, everything should look like:

prop1: 'message'
prop2: '<color=wow>wow</color>'

and not

prop1: message
prop2: '<color=wow>wow</color>'

Just to reduce the amount of config parsing errors that we get.

PintTheDragon avatar Jul 29 '21 05:07 PintTheDragon

https://github.com/aaubry/YamlDotNet/issues/315#issuecomment-380361996

Jesus-QC avatar Feb 11 '22 23:02 Jesus-QC

dont have time to implement it rn, will leave that there

Jesus-QC avatar Feb 11 '22 23:02 Jesus-QC

aaubry/YamlDotNet#315 (comment)

I've looked into this, although it seems like it wraps both keys and values in strings.

PintTheDragon avatar Feb 21 '22 00:02 PintTheDragon

Ew

joker-119 avatar Feb 21 '22 03:02 joker-119

#1808

louis1706 avatar May 20 '23 15:05 louis1706