Skip to content

Conversation

@davlee1972
Copy link

@davlee1972 davlee1972 commented Feb 21, 2025

Replaced block of code skipping empty strings in lists with:

New block of code that pops empty string values in the first item and last item of a token list if that token list was generated from a multiline list. All other empty string values in lists are preserved and not dropped..

Fixes:
#232
Related Issue:
#317

Fixed token list parsing for empty strings in token list.
@davlee1972
Copy link
Author

Testing results:

image

@davlee1972 davlee1972 changed the title Update config_parser.py Fixed parsing for empty strings in lists getting dropped Feb 24, 2025
@davlee1972
Copy link
Author

davlee1972 commented Feb 24, 2025

There should be error checking for invalid ",," in hocon lists, but that is a different issue. Right now those will be just be included as additional empty strings in a list.

image

https://getakka.net/articles/configuration/hocon.html

[1,2,3,,] is invalid because it has two trailing commas.
[,1,2,3] is invalid because it has an initial comma.
[1,,2,3] is invalid because it has two commas in a row.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant