Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Jérome Perrin
erp5
Commits
208417cd
Commit
208417cd
authored
Nov 02, 2017
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
codemirror: define `hanging_indent: 4` for python
to match what yapf is doing
parent
e37edff6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
bt5/erp5_code_mirror/SkinTemplateItem/portal_skins/erp5_code_mirror/code_mirror_support.txt
...tem/portal_skins/erp5_code_mirror/code_mirror_support.txt
+6
-2
No files found.
bt5/erp5_code_mirror/SkinTemplateItem/portal_skins/erp5_code_mirror/code_mirror_support.txt
View file @
208417cd
...
...
@@ -240,7 +240,7 @@
generateHistorySelectElement();
/* check getTextContent have not changed server side (for example YAPF) */
if (mode ==
'python'
) {
if (mode ==
= 'python' || (mode && mode.name === 'python')
) {
$.ajax({
type: 'GET',
url: 'getTextContent',
...
...
@@ -347,7 +347,7 @@
function saveZMIDocument(cm, event) {
/* preformat with YAPF before saving */
if (mode ==
'python'
) {
if (mode ==
= 'python' || (mode && mode.name === 'python')
) {
$.ajax({
type: 'POST',
url: '&dtml-portal_url;/ERP5Site_formatPythonSourceCode',
...
...
@@ -514,6 +514,10 @@
<dtml-if expr="mode == 'python'">
lint_option = {"getAnnotations": checkPythonSourceCode,
"async": true};
mode = {
name: "python",
hangingIndent: 4
}
<dtml-elif expr="mode in ('css', 'javascript')">
lint_option = true;
<dtml-else>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment