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

Invalid result with multi-line character string and line feed #80

Closed
pashango2 opened this issue Mar 24, 2017 · 1 comment
Closed

Invalid result with multi-line character string and line feed #80

pashango2 opened this issue Mar 24, 2017 · 1 comment

Comments

@pashango2
Copy link

It looks like a legitimate TOML to me, but a combination of line feed and multiline literal produces incorrect results.

text = """
    lines = '''
    The first newline is
    trimmed in raw strings.
       'All other whitespace'
       is preserved.
    '''
""".strip()

obj = toml.loads(text)
# invalid
#{u'lines': u"    The first newline is\ntrimmed in raw strings.\n'All other whitespa e''       is preserved.\n"}

# valid
#{u'lines': u"    The first newline is\ntrimmed in raw strings.\n'All other whitespace'       is preserved.\n"}

It seems that there is a problem with the line feed after quoting in the multiline literal.

toml: 0.9.0
python:2.7

@uiri
Copy link
Owner

uiri commented Apr 12, 2017

It looks like this might be a duplicate of #68 (or a related issue with a similar fix).
I will revisit this after that issue is fixed.

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