DiffSK / configobj

Python 3+ compatible port of the configobj library
https://configobj.readthedocs.org
Other
322 stars 76 forks source link

\n is not an acceptable key value? #210

Open keko950 opened 3 years ago

keko950 commented 3 years ago

Hi! Im having some troubles with multilines values. Im trying to add a key that has as content multiple \n but it doesn't work and im not sure why.

You can reproduce the error with this simple code: a = configobj.ConfigObj(infile=['a="""line1 \n line2 \n line3"""'])

lib/python3.8/site-packages/configobj.py", line 1318, in _load
    raise error
configobj.ParseError: Invalid line ('a="""line1 \n line2 \n line3"""') (matched as neither section nor keyword) at line 1.
robdennis commented 1 year ago

The next action is to see if still happens with other string literals (or something more dynamic), based on that, I'll determine if this is more bug or more documentation