mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-27 14:12:09 +00:00
Remove trailing whitespace
courtesy of html-validate
This commit is contained in:
parent
b0d260e82b
commit
1a35c861df
4 changed files with 43 additions and 9 deletions
|
@ -87,7 +87,7 @@
|
||||||
{{ $webmention.source | strings.TrimPrefix "https://" | strings.TrimPrefix "www." | strings.TrimRight "/" | truncate 35 -}}
|
{{ $webmention.source | strings.TrimPrefix "https://" | strings.TrimPrefix "www." | strings.TrimRight "/" | truncate 35 -}}
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
<a class="u-url" itemprop="url" href="{{ $src }}" rel="nofollow ugc">liked</a> this
|
<a class="u-url" itemprop="url" href="{{ $src }}" rel="nofollow ugc">liked</a> this
|
||||||
{{ else -}}
|
{{- else -}}
|
||||||
{{- if findRE `^https://brid.gy/[^/]*/mastodon` $webmention.source -}}
|
{{- if findRE `^https://brid.gy/[^/]*/mastodon` $webmention.source -}}
|
||||||
{{- $canonicalSrc := replaceRE "https://brid.gy/.*mastodon/@Seirdy@pleroma.envs.net/([^/]*)(.*)?" `https://pleroma.envs.net/notice/$1` $src -}}
|
{{- $canonicalSrc := replaceRE "https://brid.gy/.*mastodon/@Seirdy@pleroma.envs.net/([^/]*)(.*)?" `https://pleroma.envs.net/notice/$1` $src -}}
|
||||||
<a class="u-url" itemprop="url" href="{{ $canonicalSrc }}" rel="nofollow ugc">
|
<a class="u-url" itemprop="url" href="{{ $canonicalSrc }}" rel="nofollow ugc">
|
||||||
|
@ -96,10 +96,10 @@
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
<span itemprop="name" class="p-name">
|
<span itemprop="name" class="p-name">
|
||||||
{{ if $webmention.title -}}
|
{{ if $webmention.title -}}
|
||||||
{{ $title | truncate 200 | replaceRE ` \n` `
|
{{ $title | truncate 200 | replaceRE ` *\n` `
|
||||||
` | safeHTML -}}
|
` | safeHTML -}}
|
||||||
{{ else -}}
|
{{ else -}}
|
||||||
{{- $webmention.source | strings.TrimPrefix "https://" | strings.TrimPrefix "www." | strings.TrimRight "/" | truncate 35 -}}
|
{{- $webmention.source | strings.TrimPrefix "https://" | strings.TrimPrefix "www." | strings.TrimRight "/" | replaceRE ` *\n` "\n" | truncate 35 -}}
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
</span
|
</span
|
||||||
></a>
|
></a>
|
||||||
|
@ -110,8 +110,8 @@
|
||||||
{{- if findRE `^https://brid.gy/[^/]*/mastodon` $webmention.source -}}
|
{{- if findRE `^https://brid.gy/[^/]*/mastodon` $webmention.source -}}
|
||||||
<p role="doc-tip" itemprop="accessibilitySummary">This comment may have major formatting errors that could impact screen reader comprehension.</p>
|
<p role="doc-tip" itemprop="accessibilitySummary">This comment may have major formatting errors that could impact screen reader comprehension.</p>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
<p><q itemprop="text" class="p-content">{{ $webmention.content | replaceRE `^@Seirdy(@pleroma.envs.net)? ?` "" | replaceRE ` \n` `
|
<p><q itemprop="text" class="p-content">{{ $webmention.content | replaceRE `^@Seirdy(@pleroma.envs.net)? ?` "" | replaceRE `([ \t]*)?\n*([ \t]*)?` `
|
||||||
`}}</q></p>
|
` | trim "\n\t" | chomp}}</q></p>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</dd>
|
</dd>
|
||||||
|
|
34
linter-configs/htmlvalidate.json
Normal file
34
linter-configs/htmlvalidate.json
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
{
|
||||||
|
"extends": [
|
||||||
|
"html-validate:recommended",
|
||||||
|
"html-validate:standard",
|
||||||
|
"html-validate:a11y",
|
||||||
|
"html-validate:document"
|
||||||
|
],
|
||||||
|
"rules": {
|
||||||
|
"attribute-empty-style": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
"style": "empty"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"attribute-boolean-style": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
"style": "empty"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"void-style": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
"style": "selfclosing"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"require-sri": [
|
||||||
|
"off"
|
||||||
|
],
|
||||||
|
"prefer-button": [
|
||||||
|
"off"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue