From a625f3a76198bed3c857f5c00f238bf9516ca950 Mon Sep 17 00:00:00 2001 From: silverwind Date: Fri, 1 Sep 2023 19:32:39 +0200 Subject: [PATCH] Enable djlint H008 and fix issues (#26869) Enable `H008 | Attributes should be double quoted` and fix issues. --- pyproject.toml | 2 +- templates/repo/issue/view_content/attachments.tmpl | 4 ++-- templates/repo/issue/view_content/comments.tmpl | 4 ++-- templates/user/dashboard/navbar.tmpl | 2 +- templates/user/notification/notification_div.tmpl | 8 ++++---- templates/user/overview/header.tmpl | 8 ++++---- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 549a8cb2b0..f4cd2e6744 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,4 +12,4 @@ djlint = "1.32.1" [tool.djlint] profile="golang" -ignore="H005,H006,H008,H013,H016,H020,H021,H030,H031" +ignore="H005,H006,H013,H016,H020,H021,H030,H031" diff --git a/templates/repo/issue/view_content/attachments.tmpl b/templates/repo/issue/view_content/attachments.tmpl index 2eb0fcf61c..b74b6ce918 100644 --- a/templates/repo/issue/view_content/attachments.tmpl +++ b/templates/repo/issue/view_content/attachments.tmpl @@ -6,7 +6,7 @@ {{- range .Attachments -}}
- + {{if FilenameIsImage .Name}} {{if not (StringUtils.Contains $.Content .UUID)}} {{$hasThumbnails = true}} @@ -31,7 +31,7 @@ {{if FilenameIsImage .Name}} {{if not (StringUtils.Contains $.Content .UUID)}} - {{.Name}} + {{.Name}} {{end}} {{end}} diff --git a/templates/repo/issue/view_content/comments.tmpl b/templates/repo/issue/view_content/comments.tmpl index 8c99973827..d43979ff59 100644 --- a/templates/repo/issue/view_content/comments.tmpl +++ b/templates/repo/issue/view_content/comments.tmpl @@ -111,9 +111,9 @@ {{template "shared/user/authorlink" .Poster}} {{$link := printf "%s/commit/%s" $.Repository.Link ($.Issue.PullRequest.MergedCommitID|PathEscape)}} {{if eq $.Issue.PullRequest.Status 3}} - {{$.locale.Tr "repo.issues.comment_manually_pull_merged_at" (printf "%[2]s" ($link|Escape) (ShortSha $.Issue.PullRequest.MergedCommitID)) (printf "%[1]s" ($.BaseTarget|Escape)) $createdStr | Safe}} + {{$.locale.Tr "repo.issues.comment_manually_pull_merged_at" (printf `%[2]s` ($link|Escape) (ShortSha $.Issue.PullRequest.MergedCommitID)) (printf "%[1]s" ($.BaseTarget|Escape)) $createdStr | Safe}} {{else}} - {{$.locale.Tr "repo.issues.comment_pull_merged_at" (printf "%[2]s" ($link|Escape) (ShortSha $.Issue.PullRequest.MergedCommitID)) (printf "%[1]s" ($.BaseTarget|Escape)) $createdStr | Safe}} + {{$.locale.Tr "repo.issues.comment_pull_merged_at" (printf `%[2]s` ($link|Escape) (ShortSha $.Issue.PullRequest.MergedCommitID)) (printf "%[1]s" ($.BaseTarget|Escape)) $createdStr | Safe}} {{end}}
diff --git a/templates/user/dashboard/navbar.tmpl b/templates/user/dashboard/navbar.tmpl index 0c185807c1..ee9e7e60ad 100644 --- a/templates/user/dashboard/navbar.tmpl +++ b/templates/user/dashboard/navbar.tmpl @@ -97,7 +97,7 @@ {{end}} diff --git a/templates/user/notification/notification_div.tmpl b/templates/user/notification/notification_div.tmpl index 3cc9d31d52..415051ae95 100644 --- a/templates/user/notification/notification_div.tmpl +++ b/templates/user/notification/notification_div.tmpl @@ -15,7 +15,7 @@
{{$.CsrfTokenHtml}}
-
@@ -74,7 +74,7 @@ {{$.CsrfTokenHtml}} -
{{end}} {{else}} - + {{svg "octicon-rss"}} {{.locale.Tr "user.activity"}} {{if not .DisableStars}} - + {{svg "octicon-star"}} {{.locale.Tr "user.starred"}} {{if .ContextUser.NumStars}}
{{.ContextUser.NumStars}}
{{end}}
{{else}} - + {{svg "octicon-eye"}} {{.locale.Tr "user.watched"}} {{end}}