Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 571d173

Browse files
sophiebitsvjeux
authored andcommitted
Disable CodeMirror smart indentation
Fixes facebook#966.
1 parent 22772c9 commit 571d173

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

docs/_js/live_editor.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ var CodeMirrorEditor = React.createClass({
2121
mode: 'javascript',
2222
lineNumbers: false,
2323
lineWrapping: true,
24+
smartIndent: false, // javascript mode does bad things with jsx indents
2425
matchBrackets: true,
2526
theme: 'solarized-light',
2627
readOnly: this.props.readOnly

0 commit comments

Comments
 (0)