Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Allow for private prefixes to method definitions #76

Merged
merged 1 commit into from
Dec 20, 2014

Conversation

chibicode
Copy link
Contributor

@@ -1,7 +1,7 @@
'.source.ruby':
'editor':
'commentStart': '# '
'increaseIndentPattern': '(?x)^\n (\\s*\n (module|class|def\n |unless|if|else|elsif\n |case|when\n |begin|rescue|ensure\n |for|while|until\n |(?= .*? \\b(do|begin|case|if|unless)\\b )\n # the look-ahead above is to quickly discard non-candidates\n ( "(\\\\.|[^\\\\"])*+" # eat a double quoted string\n | \'(\\\\.|[^\\\\\'])*+\' # eat a single quoted string\n | [^#"\'] # eat all but comments and strings\n )*\n ( \\s (do|begin|case)\n | [-+=&|*/~%^<>~](?<!\\$.) \\s*+ (if|unless)\n )\n )\\b\n (?! [^;]*+ ; .*? \\bend\\b )\n |( "(\\\\.|[^\\\\"])*+" # eat a double quoted string\n | \'(\\\\.|[^\\\\\'])*+\' # eat a single quoted string\n | [^#"\'] # eat all but comments and strings\n )*\n ( \\{ (?! [^}]*+ \\} )\n | \\[ (?! [^\\]]*+ \\] )\n )\n ).*$'
'increaseIndentPattern': '(?x)^\n (\\s*\n (module|class|(private\\s*)?def\n |unless|if|else|elsif\n |case|when\n |begin|rescue|ensure\n |for|while|until\n |(?= .*? \\b(do|begin|case|if|unless)\\b )\n # the look-ahead above is to quickly discard non-candidates\n ( "(\\\\.|[^\\\\"])*+" # eat a double quoted string\n | \'(\\\\.|[^\\\\\'])*+\' # eat a single quoted string\n | [^#"\'] # eat all but comments and strings\n )*\n ( \\s (do|begin|case)\n | [-+=&|*/~%^<>~](?<!\\$.) \\s*+ (if|unless)\n )\n )\\b\n (?! [^;]*+ ; .*? \\bend\\b )\n |( "(\\\\.|[^\\\\"])*+" # eat a double quoted string\n | \'(\\\\.|[^\\\\\'])*+\' # eat a single quoted string\n | [^#"\'] # eat all but comments and strings\n )*\n ( \\{ (?! [^}]*+ \\} )\n | \\[ (?! [^\\]]*+ \\] )\n )\n ).*$'
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you want it to be \\s+ instead, so it matches private def, but not privatedef

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kevinsawicki fixed!

kevinsawicki added a commit that referenced this pull request Dec 20, 2014
Allow for private prefixes to method definitions
@kevinsawicki kevinsawicki merged commit a44adb0 into atom:master Dec 20, 2014
@kevinsawicki
Copy link
Contributor

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants