Reputation: 4797
in html file, there is a piece of javascript like:
{text: "EmployeeManagement", icon: "code", children: [
{text: "HR", link: [[@{/employeeManage/hr.html}]]},
{text: "Developer", link: [[@{/employeeManage/developer.html}]]},
]},
However, once I put a
if(isEmployer) {
}
around it, it formats the above code like:
if (isEmployer) {
{
text: "EmployeeManagement", children
:
[
{text: "HR", link: [[@{
/employeeManage
/hr.html
}
]]
},
{
text: "Developer", link
:
[[@{
/employeeManage
/developer.html
}
]]
}
How to turn off this automatically form? EDIT: This is the file structure:
<!DOCTYPE html>
<html lang="en"
xmlns:th="http://www.thymeleaf.org">
<head>
....
</head>
<body data-module="app" style="overflow: hidden">
<div id="desktop"></div>
<script th:inline="javascript">
/*<![CDATA[*/
var isEmployer = ...
...
{text: "EmployeeManagement", icon: "code", children: [
{text: "HR", link: [[@{/employeeManage/hr.html}]]},
{text: "Developer", link: [[@{/employeeManage/developer.html}]]},
]},
...
Upvotes: 0
Views: 36
Reputation: 2541
If you do not want to have this behaviour (I guess it is by adding }
) go to
Editor -> General -> Smart Keys and disable option Reformat block on typing }
Upvotes: 2