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 issue where single characters settings were not being saved. #126

Merged
merged 2 commits into from
Nov 6, 2014

Conversation

doboy
Copy link
Contributor

@doboy doboy commented Sep 9, 2014

@igalic
Copy link
Contributor

igalic commented Sep 10, 2014

could you please add a test case for this, so we catch it in future changes?

@@ -6,7 +6,7 @@ module Util
class IniFile

@@SECTION_REGEX = /^\s*\[([^\]]*)\]\s*$/
@@SETTING_REGEX = /^(\s*)([^\[#;][\w\d\.\\\/\-\s\[\]\']*[\w\d\.\\\/\-\]])([ \t]*=[ \t]*)([\S\s]*?)\s*$/
@@SETTING_REGEX = /^(\s*)([\w\d\.\\\/\-\s\[\]\']*[\w\d\.\\\/\-\]])([ \t]*=[ \t]*)([\S\s]*?)\s*$/
@@COMMENTED_SETTING_REGEX = /^(\s*)[#;]+(\s*)([^\[]*[\w\d\.\\\/\-]+[\w\d\.\\\/\-\[\]\']+)([ \t]*=[ \t]*)([\S\s]*?)\s*$/
Copy link
Contributor

Choose a reason for hiding this comment

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

Does @@COMMENTED_SETTING_REGEX have the same issue as @@SETTING_REGEX?

… setting

also update @@COMMENTED_SETTING_REGEX to be roughly equal to "(\s*)[#;]+" + @@SETTING_REGEX
underscorgan pushed a commit that referenced this pull request Nov 6, 2014
fix issue where single characters settings were not being saved.
@underscorgan underscorgan merged commit 3f4ad49 into puppetlabs:master Nov 6, 2014
@underscorgan
Copy link
Contributor

Thanks for the contribution @huan

cegeka-jenkins pushed a commit to cegeka/puppet-inifile that referenced this pull request Oct 23, 2017
fix issue where single characters settings were not being saved.
@smortex smortex added the bugfix label Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants