enable preserve-inline option for jsbeautify

pull/449/head
nightwing 2017-08-02 13:19:38 +04:00
rodzic f7f5111b2c
commit 4661d1dec4
2 zmienionych plików z 11 dodań i 3 usunięć

Wyświetl plik

@ -417,7 +417,7 @@ define(function(require, exports, module) {
var cursor = ace.selection.lead;
var columnText = (cursor.row + 1) + ":" + (cursor.column + 1);
if (ace.selection.rangeCount)
columnText += " [" + ace.selection.rangeCount + "\u202f]";
columnText += " [\u202f" + ace.selection.rangeCount + "\u202f]";
setCaption(lblRowCol, columnText);
}

Wyświetl plik

@ -44,6 +44,7 @@ define(function(require, exports, module) {
["keeparrayindentation", "false"],
["jslinthappy", "false"],
["braces", "end-expand"],
["preserve-inline", true],
["space_before_conditional", "true"],
["unescape_strings", "true"],
["indent_inner_html", false],
@ -109,6 +110,11 @@ define(function(require, exports, module) {
{ value: "end-expand", caption: "End braces on own line" }
]
},
"Preserve Inline Blocks": {
type: "checkbox",
path: "project/format/jsbeautify/@preserve-inline",
position: 353.5,
},
"Space Before Conditionals": {
type: "checkbox",
path: "project/format/jsbeautify/@space_before_conditional",
@ -240,9 +246,11 @@ define(function(require, exports, module) {
if (!options.hasOwnProperty("jslint_happy"))
options.jslint_happy =
settings.getBool("project/format/jsbeautify/@jslinthappy");
if (!options.hasOwnProperty("brace_style"))
if (!options.hasOwnProperty("brace_style")) {
options.brace_style =
settings.get("project/format/jsbeautify/@braces");
settings.get("project/format/jsbeautify/@braces") +
(settings.get("project/format/jsbeautify/@preserve-inline") ? ",preserve-inline" : "");
}
if (!options.hasOwnProperty("indent_inner_html"))
options.indent_inner_html =
settings.get("project/format/jsbeautify/@indent_inner_html");