Skip to content

Conversation

@gandarez
Copy link
Contributor

@gandarez gandarez commented Dec 1, 2021

What problem should be fixed?

When parsing python multiline values and the key which is being parsed is the last one on the ini file and there's no new line at the end, then it throws an error. To fix that we might not consider EOF as an error when reading the last line because it's either can be a \n or EOF.

This problem was first reported here.

Have you added test cases to catch the problem?

The TestPythonMultiline_EOF was added.

@codecov
Copy link

codecov bot commented Dec 1, 2021

Codecov Report

Merging #309 (41ca362) into main (e641746) will decrease coverage by 0.08%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main     #309      +/-   ##
==========================================
- Coverage   88.28%   88.20%   -0.09%     
==========================================
  Files           9        9              
  Lines        1349     1348       -1     
==========================================
- Hits         1191     1189       -2     
  Misses         96       96              
- Partials       62       63       +1     

@gandarez gandarez force-pushed the bugfix/python-multiline-eof branch from acf928e to 41ca362 Compare December 1, 2021 21:09
Copy link
Member

@unknwon unknwon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@unknwon unknwon merged commit 3ca1e6a into go-ini:main Dec 2, 2021
@unknwon
Copy link
Member

unknwon commented Dec 2, 2021

https://github.com/go-ini/ini/releases/tag/v1.66.1 has been tagged for this merge.

@gandarez gandarez deleted the bugfix/python-multiline-eof branch December 2, 2021 21:01
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.

2 participants