Skip to content
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

Comments are not allowed to contain newlines #1

Closed
Sculas opened this issue Apr 26, 2022 · 2 comments
Closed

Comments are not allowed to contain newlines #1

Sculas opened this issue Apr 26, 2022 · 2 comments

Comments

@Sculas
Copy link

Sculas commented Apr 26, 2022

Comments are not allowed to contain newlines or carriage returns.
Try saving a file with these contents:

# This file contains the configuration for all items.
# It is highly recommended to edit this in-game.

then parsing it using this code:

TomlValue.from(itemConfigurationPath)

will result in this error:

cc.ekblad.toml.model.TomlException$ParseError: toml parse error, on line 1: disallowed character(s) encountered: 13
	at cc.ekblad.toml.serialization.TomlParserAdapterKt.throwOnBadChar(TomlParserAdapter.kt:181) ~[4koma-1.0.1.jar:?]
	at cc.ekblad.toml.serialization.TomlParserAdapterKt.extractExpression(TomlParserAdapter.kt:21) ~[4koma-1.0.1.jar:?]
	at cc.ekblad.toml.serialization.TomlParserAdapterKt.extractDocument(TomlParserAdapter.kt:15) ~[4koma-1.0.1.jar:?]
	at cc.ekblad.toml.serialization.TomlDeserializerKt.from(TomlDeserializer.kt:51) ~[4koma-1.0.1.jar:?]
	at cc.ekblad.toml.serialization.TomlDeserializerKt.from(TomlDeserializer.kt:36) ~[4koma-1.0.1.jar:?]

Note: I am on Windows 10.

@valderman
Copy link
Owner

Good catch! Will put out a 1.0.2 release with a fix in a moment.

@Sculas
Copy link
Author

Sculas commented Apr 26, 2022

Thank you!

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

No branches or pull requests

2 participants