eo-yaml icon indicating copy to clipboard operation
eo-yaml copied to clipboard

Scalar issue regarding quoted colons

Open LOOHP opened this issue 3 years ago • 4 comments

Due to how the regex pattern and indexOf(":") are set up in ReadPlainScalar and ReadYamlMapping, keys and values like this isn't handled correctly. For example:

"interactionvisualizer:crafting_table": "Crafting Table"
Modes: "Toggle Modes: itemstand, itemdrop, hologram"

For values, it would match the last occurring ":". For keys, it will always match the first ":", disregarding whether it is quoted or not.

(I've forked to the repo to sort of fix it myself with a few changes)

LOOHP avatar Jan 26 '22 05:01 LOOHP

@LOOHP thank you for reporting this. I'll assign someone to take care of it soon.

zoeself avatar Jan 26 '22 05:01 zoeself

@amihaiemil I couldn't find any assignee for this task. This is either because there are no contributors with role DEV available or because the project does not have enough funds.

Please, make sure there is at least one available contributor with the required role and the project can afford to pay them.

zoeself avatar Jan 26 '22 05:01 zoeself

@LOOHP It would be useful to submit a PR with a failing unit tests which illustrates this bug exactly. Then we have a good starting point for fixing : D

amihaiemil avatar Jan 26 '22 06:01 amihaiemil

I've submitted one test each for ReadPlainScalar and ReadYamlMapping which fails due to this bug.

LOOHP avatar Jan 26 '22 08:01 LOOHP

this has been mostly fixed with release 7.0.3. Only small details remaining, to be released with 7.0.4

amihaiemil avatar Feb 06 '23 19:02 amihaiemil

@LOOHP This is mostly fixed in 7.0.3, only small details remain to be release with 7.0.4, very soon.

amihaiemil avatar Feb 06 '23 19:02 amihaiemil