Skip to content

Commit a625f3a

Browse files
authored
Enable djlint H008 and fix issues (#26869)
Enable `H008 | Attributes should be double quoted` and fix issues.
1 parent 5743d7c commit a625f3a

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ djlint = "1.32.1"
1212

1313
[tool.djlint]
1414
profile="golang"
15-
ignore="H005,H006,H008,H013,H016,H020,H021,H030,H031"
15+
ignore="H005,H006,H013,H016,H020,H021,H030,H031"

templates/repo/issue/view_content/attachments.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
{{- range .Attachments -}}
77
<div class="gt-df">
88
<div class="gt-f1 gt-p-3">
9-
<a target="_blank" rel="noopener noreferrer" href="{{.DownloadURL}}" title='{{$.ctxData.locale.Tr "repo.issues.attachment.open_tab" .Name}}'>
9+
<a target="_blank" rel="noopener noreferrer" href="{{.DownloadURL}}" title="{{$.ctxData.locale.Tr "repo.issues.attachment.open_tab" .Name}}">
1010
{{if FilenameIsImage .Name}}
1111
{{if not (StringUtils.Contains $.Content .UUID)}}
1212
{{$hasThumbnails = true}}
@@ -31,7 +31,7 @@
3131
{{if FilenameIsImage .Name}}
3232
{{if not (StringUtils.Contains $.Content .UUID)}}
3333
<a target="_blank" rel="noopener noreferrer" href="{{.DownloadURL}}">
34-
<img alt="{{.Name}}" src="{{.DownloadURL}}" title='{{$.ctxData.locale.Tr "repo.issues.attachment.open_tab" .Name}}'>
34+
<img alt="{{.Name}}" src="{{.DownloadURL}}" title="{{$.ctxData.locale.Tr "repo.issues.attachment.open_tab" .Name}}">
3535
</a>
3636
{{end}}
3737
{{end}}

templates/repo/issue/view_content/comments.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,9 @@
111111
{{template "shared/user/authorlink" .Poster}}
112112
{{$link := printf "%s/commit/%s" $.Repository.Link ($.Issue.PullRequest.MergedCommitID|PathEscape)}}
113113
{{if eq $.Issue.PullRequest.Status 3}}
114-
{{$.locale.Tr "repo.issues.comment_manually_pull_merged_at" (printf "<a class='ui sha' href='%[1]s'><b>%[2]s</b></a>" ($link|Escape) (ShortSha $.Issue.PullRequest.MergedCommitID)) (printf "<b>%[1]s</b>" ($.BaseTarget|Escape)) $createdStr | Safe}}
114+
{{$.locale.Tr "repo.issues.comment_manually_pull_merged_at" (printf `<a class="ui sha" href="%[1]s"><b>%[2]s</b></a>` ($link|Escape) (ShortSha $.Issue.PullRequest.MergedCommitID)) (printf "<b>%[1]s</b>" ($.BaseTarget|Escape)) $createdStr | Safe}}
115115
{{else}}
116-
{{$.locale.Tr "repo.issues.comment_pull_merged_at" (printf "<a class='ui sha' href='%[1]s'><b>%[2]s</b></a>" ($link|Escape) (ShortSha $.Issue.PullRequest.MergedCommitID)) (printf "<b>%[1]s</b>" ($.BaseTarget|Escape)) $createdStr | Safe}}
116+
{{$.locale.Tr "repo.issues.comment_pull_merged_at" (printf `<a class="ui sha" href="%[1]s"><b>%[2]s</b></a>` ($link|Escape) (ShortSha $.Issue.PullRequest.MergedCommitID)) (printf "<b>%[1]s</b>" ($.BaseTarget|Escape)) $createdStr | Safe}}
117117
{{end}}
118118
</span>
119119
</div>

templates/user/dashboard/navbar.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
</a>
9898
{{end}}
9999
<div class="item">
100-
<a class="ui primary basic button" href="{{.ContextUser.HomeLink}}" title='{{.locale.Tr "home.view_home" .ContextUser.Name}}'>
100+
<a class="ui primary basic button" href="{{.ContextUser.HomeLink}}" title="{{.locale.Tr "home.view_home" .ContextUser.Name}}">
101101
{{.locale.Tr "home.view_home" (.ContextUser.ShortName 40)}}
102102
</a>
103103
</div>

templates/user/notification/notification_div.tmpl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<form action="{{AppSubUrl}}/notifications/purge" method="post">
1616
{{$.CsrfTokenHtml}}
1717
<div class="{{if not $notificationUnreadCount}}gt-hidden{{end}}">
18-
<button class="ui mini button primary gt-mr-0" title='{{$.locale.Tr "notification.mark_all_as_read"}}'>
18+
<button class="ui mini button primary gt-mr-0" title="{{$.locale.Tr "notification.mark_all_as_read"}}">
1919
{{svg "octicon-checklist"}}
2020
</button>
2121
</div>
@@ -74,7 +74,7 @@
7474
{{$.CsrfTokenHtml}}
7575
<input type="hidden" name="notification_id" value="{{.ID}}">
7676
<input type="hidden" name="status" value="pinned">
77-
<button class="btn interact-bg gt-p-3" title='{{$.locale.Tr "notification.pin"}}'
77+
<button class="btn interact-bg gt-p-3" title="{{$.locale.Tr "notification.pin"}}"
7878
data-url="{{AppSubUrl}}/notifications/status"
7979
data-status="pinned"
8080
data-page="{{$.Page.Paginater.Current}}"
@@ -90,7 +90,7 @@
9090
<input type="hidden" name="notification_id" value="{{.ID}}">
9191
<input type="hidden" name="status" value="read">
9292
<input type="hidden" name="page" value="{{$.Page.Paginater.Current}}">
93-
<button class="btn interact-bg gt-p-3" title='{{$.locale.Tr "notification.mark_as_read"}}'
93+
<button class="btn interact-bg gt-p-3" title="{{$.locale.Tr "notification.mark_as_read"}}"
9494
data-url="{{AppSubUrl}}/notifications/status"
9595
data-status="read"
9696
data-page="{{$.Page.Paginater.Current}}"
@@ -105,7 +105,7 @@
105105
<input type="hidden" name="notification_id" value="{{.ID}}">
106106
<input type="hidden" name="status" value="unread">
107107
<input type="hidden" name="page" value="{{$.Page.Paginater.Current}}">
108-
<button class="btn interact-bg gt-p-3" title='{{$.locale.Tr "notification.mark_as_unread"}}'
108+
<button class="btn interact-bg gt-p-3" title="{{$.locale.Tr "notification.mark_as_unread"}}"
109109
data-url="{{AppSubUrl}}/notifications/status"
110110
data-status="unread"
111111
data-page="{{$.Page.Paginater.Current}}"

templates/user/overview/header.tmpl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div class="ui secondary stackable pointing menu">
22
{{if .HasProfileReadme}}
3-
<a class='{{if eq .TabName "overview"}}active {{end}}item' href="{{.ContextUser.HomeLink}}?tab=overview">
3+
<a class="{{if eq .TabName "overview"}}active {{end}}item" href="{{.ContextUser.HomeLink}}?tab=overview">
44
{{svg "octicon-info"}} {{.locale.Tr "user.overview"}}
55
</a>
66
{{end}}
@@ -50,18 +50,18 @@
5050
</div>
5151
{{end}}
5252
{{else}}
53-
<a class='{{if eq .TabName "activity"}}active {{end}}item' href="{{.ContextUser.HomeLink}}?tab=activity">
53+
<a class="{{if eq .TabName "activity"}}active {{end}}item" href="{{.ContextUser.HomeLink}}?tab=activity">
5454
{{svg "octicon-rss"}} {{.locale.Tr "user.activity"}}
5555
</a>
5656
{{if not .DisableStars}}
57-
<a class='{{if eq .TabName "stars"}}active {{end}}item' href="{{.ContextUser.HomeLink}}?tab=stars">
57+
<a class="{{if eq .TabName "stars"}}active {{end}}item" href="{{.ContextUser.HomeLink}}?tab=stars">
5858
{{svg "octicon-star"}} {{.locale.Tr "user.starred"}}
5959
{{if .ContextUser.NumStars}}
6060
<div class="ui small label">{{.ContextUser.NumStars}}</div>
6161
{{end}}
6262
</a>
6363
{{else}}
64-
<a class='{{if eq .TabName "watching"}}active {{end}}item' href="{{.ContextUser.HomeLink}}?tab=watching">
64+
<a class="{{if eq .TabName "watching"}}active {{end}}item" href="{{.ContextUser.HomeLink}}?tab=watching">
6565
{{svg "octicon-eye"}} {{.locale.Tr "user.watched"}}
6666
</a>
6767
{{end}}

0 commit comments

Comments
 (0)