aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorAndrey Nering <andrey.nering@gmail.com>2016-08-11 21:07:09 -0300
committer无闻 <u@gogs.io>2016-08-11 17:07:09 -0700
commitdbed39ba05fd498dad6cd3bf127c1f68056bf2ab (patch)
tree5f57a18ecdb444bbf52e583894fc38f2d8d50280 /templates
parentaa1fc30b898a928ddafbfd0fddc47547c04f96e5 (diff)
downloadgitea-dbed39ba05fd498dad6cd3bf127c1f68056bf2ab.tar.gz
gitea-dbed39ba05fd498dad6cd3bf127c1f68056bf2ab.zip
On showing diff/file, use the tab_width specified on .editorconfig, if any (#3241)
Closes #3182
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/diff_box.tmpl2
-rw-r--r--templates/repo/view_file.tmpl2
2 files changed, 2 insertions, 2 deletions
diff --git a/templates/repo/diff_box.tmpl b/templates/repo/diff_box.tmpl
index 76a414d23e..fefca9b60d 100644
--- a/templates/repo/diff_box.tmpl
+++ b/templates/repo/diff_box.tmpl
@@ -53,7 +53,7 @@
</div>
{{else}}
{{$highlightClass := $file.GetHighlightClass}}
- <div class="diff-file-box diff-box file-content" id="diff-{{.Index}}">
+ <div class="diff-file-box diff-box file-content {{TabSizeClass $.Editorconfig $file.Name}}" id="diff-{{.Index}}">
<h4 class="ui top attached normal header">
<div class="diff-counter count ui left">
{{if $file.IsBin}}
diff --git a/templates/repo/view_file.tmpl b/templates/repo/view_file.tmpl
index 0f42df4925..76175334d2 100644
--- a/templates/repo/view_file.tmpl
+++ b/templates/repo/view_file.tmpl
@@ -1,4 +1,4 @@
-<div id="file-content">
+<div id="file-content" class="{{TabSizeClass .Editorconfig .FileName}}">
<h4 class="ui top attached header" id="{{if .ReadmeExist}}repo-readme{{else}}repo-read-file{{end}}">
{{if .ReadmeExist}}
<i class="book icon ui left"></i>