Skip to content

Commit

Permalink
Renamed option useBeautify to useBeautifyOnStart fixes #107
Browse files Browse the repository at this point in the history
  • Loading branch information
w8tcha committed Dec 26, 2016
1 parent 153b63d commit 5ec2513
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ config.codemirror = {
// Set this to the theme you wish to use (codemirror themes)
theme: 'default',

// "Whether or not to use Beautify for auto formatting
useBeautify: false
// "Whether or not to use Beautify for auto formatting On start
useBeautifyOnStart: false
};

````
10 changes: 5 additions & 5 deletions codemirror/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
showUncommentButton: true,
styleActiveLine: true,
theme: 'default',
useBeautify: false
useBeautifyOnStart: false
};

// Get Config & Lang
Expand Down Expand Up @@ -96,7 +96,7 @@
}
},
foldGutter: true,
gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"]
gutters: ["CodeMirror-linenumbbers", "CodeMirror-foldgutter"]
});

var holderHeight = height + 'px';
Expand All @@ -106,7 +106,7 @@
window["codemirror_" + editor.id].config = config;

if (config.autoFormatOnStart) {
if (config.useBeautify) {
if (config.useBeautifyOnStart) {
var indent_size = 4,
indent_char = ' ',
brace_style = 'collapse'; //collapse, expand, end-expand
Expand Down Expand Up @@ -604,7 +604,7 @@
scriptFiles.push(rootPath + 'js/codemirror.mode.htmlmixed.min.js');
}

if (config.useBeautify) {
if (config.useBeautifyOnStart) {
scriptFiles.push(rootPath + 'js/beautify.min.js');
}

Expand Down Expand Up @@ -732,7 +732,7 @@
// Store config so we can access it within commands etc.
window["codemirror_" + editor.id].config = config;
if (config.autoFormatOnStart) {
if (config.useBeautify) {
if (config.useBeautifyOnStart) {
var indent_size = 4;
var indent_char = ' ';
var brace_style = 'collapse'; //collapse, expand, end-expand
Expand Down

0 comments on commit 5ec2513

Please sign in to comment.