Ensure non-word char before and ( after. Support space around dot. #26

Merged
merged 2 commits into from Jul 7, 2012

Conversation

Projects
None yet
2 participants

Qard commented Jul 7, 2012

Fix for #25.

Ensure non-word character before and parenthesis after replacement. Also, support spaces/tabs/linebreaks around dot separator.

Ensure non-word character before and parenthesis after replacement. A…
…lso, support spaces/tabs/linebreaks around dot separator.
Owner

blakmatrix commented Jul 7, 2012

this unfortunately grabs too much and to little, , it'll grab non word characters like _- and even newlines, also by require the left parentheses this would fail on parts where the code is seperated out from the function call ie ( path.exists | foo )()

Don't match _ or - and be more flexible about end character--just ens…
…ure it's not a word-character, like the start

Qard commented Jul 7, 2012

That better?

blakmatrix added a commit that referenced this pull request Jul 7, 2012

Merge pull request #26 from Qard/master
Ensure non-word char before and ( after. Support space around dot.

@blakmatrix blakmatrix merged commit d1e82c6 into blakmatrix:master Jul 7, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment