From d848098f60f78e6b4a72ae7f769fd66399a8ba82 Mon Sep 17 00:00:00 2001 From: silverwind Date: Sun, 11 Apr 2021 05:46:37 +0200 Subject: Enforce tab indentation in templates (#15289) * Enforce tab indendation in templates This adds editorconfig-checker [1] to lint the template files so they conform the editorconfig files. I fixed all current identation issues using the fix mode of eclint [2] and some manual corrections. We can extend this linting to other files later, for now I'd like this PR to focus on HTML template files only. [1] https://github.com/editorconfig-checker/editorconfig-checker [2] https://github.com/jedmao/eclint * fix indendation Co-authored-by: zeripath Co-authored-by: techknowlogick --- templates/repo/diff/compare.tmpl | 6 +++--- templates/repo/diff/csv_diff.tmpl | 2 +- templates/repo/diff/image_diff.tmpl | 2 +- templates/repo/diff/new_review.tmpl | 12 ++++-------- 4 files changed, 9 insertions(+), 13 deletions(-) (limited to 'templates/repo/diff') diff --git a/templates/repo/diff/compare.tmpl b/templates/repo/diff/compare.tmpl index fdf65aaad3..124b4e5d1c 100644 --- a/templates/repo/diff/compare.tmpl +++ b/templates/repo/diff/compare.tmpl @@ -117,9 +117,9 @@ {{end}} {{else if and .PageIsComparePull (gt .CommitCount 0)}} {{if .HasPullRequest}} -
- {{.i18n.Tr "repo.pulls.has_pull_request" $.RepoLink $.RepoRelPath .PullRequest.Index | Safe}} -
+
+ {{.i18n.Tr "repo.pulls.has_pull_request" $.RepoLink $.RepoRelPath .PullRequest.Index | Safe}} +
{{else}} {{if and $.IsSigned (not .Repository.IsArchived)}}
diff --git a/templates/repo/diff/csv_diff.tmpl b/templates/repo/diff/csv_diff.tmpl index c4af70461f..b86e9d2a72 100644 --- a/templates/repo/diff/csv_diff.tmpl +++ b/templates/repo/diff/csv_diff.tmpl @@ -43,4 +43,4 @@ {{end}} - \ No newline at end of file + diff --git a/templates/repo/diff/image_diff.tmpl b/templates/repo/diff/image_diff.tmpl index 01f7e3f8e8..91092c412f 100644 --- a/templates/repo/diff/image_diff.tmpl +++ b/templates/repo/diff/image_diff.tmpl @@ -106,4 +106,4 @@
-{{end}} \ No newline at end of file +{{end}} diff --git a/templates/repo/diff/new_review.tmpl b/templates/repo/diff/new_review.tmpl index 6304369416..9e65d6d420 100644 --- a/templates/repo/diff/new_review.tmpl +++ b/templates/repo/diff/new_review.tmpl @@ -13,16 +13,12 @@ {{svg "octicon-x" 16}}
- +
- - - + + + -- cgit v1.2.3