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

Can't parse multiline string #34

Open
rusikf opened this issue Aug 25, 2014 · 3 comments
Open

Can't parse multiline string #34

rusikf opened this issue Aug 25, 2014 · 3 comments

Comments

@rusikf
Copy link

rusikf commented Aug 25, 2014

In _config.toml :

description = """
 Write an awesome description for your new site here. You can edit this 
 line in _config.toml. It will appear in your document head meta (for 
 Google search results) and in your feed.xml site description."""

TOML.load_file("_config.toml")

Failed to match sequence (ALL_SPACE (TABLE / TABLE_ARRAY / KEY_VALUE / COMMENT_LINE){0, } ALL_SPACE) at line 1 char 1.
`- Don't know what to do with "descriptio" at line 1 char 1.
=> {}

I tried three single quotes and three double quotes , it doesn't work 😕

@parkr
Copy link
Collaborator

parkr commented Aug 25, 2014

I don't think this gem has been updated to support the latest master of toml-lang/toml yet.

@StanBright
Copy link

As a work-around, I you can .gsub('"""', '"') before parsing a string. Then you just have to .strip the value. At least, that's what I used.

@mlen108
Copy link

mlen108 commented Jun 2, 2017

I've hit the same problem and I found this gem https://github.com/fbernier/tomlrb has multiline strings support.

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

4 participants