Skip to content

Instantly share code, notes, and snippets.

@kryft
Created August 2, 2014 08:52
Show Gist options
  • Save kryft/b354729c78d1eef5710b to your computer and use it in GitHub Desktop.
Save kryft/b354729c78d1eef5710b to your computer and use it in GitHub Desktop.
Trouble indenting switch statements in .jsx files in web-mode
/** @jsx React.DOM */
//Indentation produced by web-mode
var Component = React.createClass({
render : function() {
var stuff = this.props.formElements.map(function(elem) {
switch(elem) {
case "textarea" :
return ( <textarea rows="4" /> );
break;
case "text" :
return ( <input type="text" /> );
default :
return null;
} //Once this brace is entered, pressing tab on any line within the switch statement
//invokes the "Wrong type argument: number-or-marker-p, nil" error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment