Skip to content

Conversation

@shoibalc
Copy link

strip leading/trailing white space and following inline comments (if separated by at least a space or a tab) from value.

…separated by at least a space or a tab) from value
@tknopp
Copy link
Contributor

tknopp commented Aug 21, 2014

I am no regexp expert so am not 100% sure if this is correct. Randomly ping @StefanKarpinski @tanmaykm @daviddelaat @ViralBShah which might have more experience or objections as they made commits to this package.

I tried it out and it seems to work so I would merge and tag if there are no objections.

@stevengj
Copy link
Member

This doesn't seem right. For example, your regex is wrong because [#,;] matches a # or ; or ,.

Also, any solution of this form is going to be brittle because ini files can contain strings. e.g. foo="###" is a perfectly valid line, and the # does not begin a comment.

@tknopp
Copy link
Contributor

tknopp commented Aug 21, 2014

Ok thanks for reviewing Steve! Then better not merging unless a proper solution is proposed.

@tknopp
Copy link
Contributor

tknopp commented Aug 21, 2014

Cross ref https://groups.google.com/forum/?fromgroups=#!topic/julia-users/O3UF-MbtxbI where the request to use the proposed PR has been made.

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.

3 participants