Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Add support for folding if statements in ERB #36

Open
wants to merge 1 commit into from

1 participant

@jkrall

Just a small tweak to the folding regexes... so that if statements in ERB views can be folded.

Pull if you like!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 10, 2011
  1. @jkrall
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 1 deletion.
  1. +2 −1  Syntaxes/HTML (Rails).plist
View
3  Syntaxes/HTML (Rails).plist
@@ -10,7 +10,7 @@
</array>
<key>foldingStartMarker</key>
<string>(?x)
- (&lt;(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|form|dl)\b.*?&gt;
+ (&lt;(?i:%-?\s+if|head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|form|dl)\b.*?&gt;
|&lt;!--(?!.*--&gt;)
|\{\s*($|\?&gt;\s*$|//|/\*(.*\*/\s*$|(?!.*?\*/)))
)</string>
@@ -19,6 +19,7 @@
(&lt;/(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|form|dl)&gt;
|^\s*--&gt;
|(^|\s)\}
+ |(&lt;%-?\s+end)\b.*?&gt;
)</string>
<key>keyEquivalent</key>
<string>^~R</string>
Something went wrong with that request. Please try again.