aboutsummaryrefslogtreecommitdiffstats
path: root/templates/repo
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2023-08-08 18:44:19 +0800
committerGitHub <noreply@github.com>2023-08-08 10:44:19 +0000
commit4fc4f6e6341cd6115dd7ac6e03888df16c6f718e (patch)
treed35d3bdc78beba6ed1a1d8b319ca90981ddee0c4 /templates/repo
parent20f47bbca932b1f6a5290fda3391928686ed0c24 (diff)
downloadgitea-4fc4f6e6341cd6115dd7ac6e03888df16c6f718e.tar.gz
gitea-4fc4f6e6341cd6115dd7ac6e03888df16c6f718e.zip
Refactor "editorconfig" (#26391)
There are 2 kinds of ".Editorconfig" in code, one is `JSON string` for the web edtior, another is `*editorconfig.Editorconfig` for the file rendering (used by `TabSizeClass`) This PR distinguish them with different names. And by the way, change the default tab size from 8 to 4, I think few people would like to use 8-size tabs nowadays.
Diffstat (limited to 'templates/repo')
-rw-r--r--templates/repo/editor/edit.tmpl2
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/repo/editor/edit.tmpl b/templates/repo/editor/edit.tmpl
index cfdb6298e5..988b11911d 100644
--- a/templates/repo/editor/edit.tmpl
+++ b/templates/repo/editor/edit.tmpl
@@ -15,7 +15,7 @@
{{range $i, $v := .TreeNames}}
<div class="divider"> / </div>
{{if eq $i $l}}
- <input id="file-name" value="{{$v}}" placeholder="{{$.locale.Tr "repo.editor.name_your_file"}}" data-editorconfig="{{$.Editorconfig}}" required autofocus>
+ <input id="file-name" value="{{$v}}" placeholder="{{$.locale.Tr "repo.editor.name_your_file"}}" data-editorconfig="{{$.EditorconfigJson}}" required autofocus>
<span data-tooltip-content="{{$.locale.Tr "repo.editor.filename_help"}}">{{svg "octicon-info"}}</span>
{{else}}
<span class="section"><a href="{{$.BranchLink}}/{{index $.TreePaths $i | PathEscapeSegments}}">{{$v}}</a></span>