Skip to content

Commit

Permalink
Merge pull request #29 from jfsawin/pascal-camel
Browse files Browse the repository at this point in the history
fix for bug with PascalCase conversion
  • Loading branch information
akalongman authored Oct 15, 2016
2 parents 1437977 + 3302616 commit 3f30ded
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stringutilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def run(self, edit):
for region in self.view.sel():
if not region.empty():
text = self.view.substr(region)
text = self.toPascalCase(text) if '_' in text and text[0].isupper() else self.toUnderscores(text)
text = self.toPascalCase(text) if '_' in text and text[0].islower() else self.toUnderscores(text)
self.view.replace(edit, region, text)

def toUnderscores(self, name):
Expand Down

0 comments on commit 3f30ded

Please sign in to comment.