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

Fix python multiline EOF error #309

Merged
merged 1 commit into from Dec 2, 2021

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     

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.

None yet

2 participants