Skip to content

Fix recursive char stripping when parsing recursive values#177

Merged
unknwon merged 1 commit into
go-ini:masterfrom
garnermccloud:garnermccloud/correct-stripping-recursive-values
Dec 22, 2018
Merged

Fix recursive char stripping when parsing recursive values#177
unknwon merged 1 commit into
go-ini:masterfrom
garnermccloud:garnermccloud/correct-stripping-recursive-values

Conversation

@garnermccloud

Copy link
Copy Markdown
Contributor

What problem should be fixed?

strings.TrimRight(noption, ")s") will strip strings that end in "s)s" which wasn't intended. We should only string the first 2 characters and last two characters of the string since we know they will be "%(" and ")s".

Have you added test cases to catch the problem?

yes

@unknwon

unknwon commented Dec 22, 2018

Copy link
Copy Markdown
Member

Thank you!

@unknwon unknwon merged commit a9da930 into go-ini:master Dec 22, 2018
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