Skip to content

Commit 896f3b4

Browse files
authored
Merge branch 'master' into user-settings-ignore-incorect-lang-value
2 parents c9f085a + 3512c7e commit 896f3b4

File tree

3 files changed

+17
-15
lines changed

3 files changed

+17
-15
lines changed

modules/markup/html.go

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -651,16 +651,18 @@ func shortLinkProcessorFull(ctx *postProcessCtx, node *html.Node, noLink bool) {
651651
// When parsing HTML, x/net/html will change all quotes which are
652652
// not used for syntax into UTF-8 quotes. So checking val[0] won't
653653
// be enough, since that only checks a single byte.
654-
if (strings.HasPrefix(val, "“") && strings.HasSuffix(val, "”")) ||
655-
(strings.HasPrefix(val, "‘") && strings.HasSuffix(val, "’")) {
656-
const lenQuote = len("‘")
657-
val = val[lenQuote : len(val)-lenQuote]
658-
} else if (strings.HasPrefix(val, "\"") && strings.HasSuffix(val, "\"")) ||
659-
(strings.HasPrefix(val, "'") && strings.HasSuffix(val, "'")) {
660-
val = val[1 : len(val)-1]
661-
} else if strings.HasPrefix(val, "'") && strings.HasSuffix(val, "’") {
662-
const lenQuote = len("‘")
663-
val = val[1 : len(val)-lenQuote]
654+
if len(val) > 1 {
655+
if (strings.HasPrefix(val, "“") && strings.HasSuffix(val, "”")) ||
656+
(strings.HasPrefix(val, "‘") && strings.HasSuffix(val, "’")) {
657+
const lenQuote = len("‘")
658+
val = val[lenQuote : len(val)-lenQuote]
659+
} else if (strings.HasPrefix(val, "\"") && strings.HasSuffix(val, "\"")) ||
660+
(strings.HasPrefix(val, "'") && strings.HasSuffix(val, "'")) {
661+
val = val[1 : len(val)-1]
662+
} else if strings.HasPrefix(val, "'") && strings.HasSuffix(val, "’") {
663+
const lenQuote = len("‘")
664+
val = val[1 : len(val)-lenQuote]
665+
}
664666
}
665667
props[key] = val
666668
}

templates/repo/shabox_badge.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<div title="{{if eq .verification.TrustStatus "trusted"}}{{else if eq .verification.TrustStatus "untrusted"}}{{$.root.i18n.Tr "repo.commits.signed_by_untrusted_user"}}: {{else}}{{$.root.i18n.Tr "repo.commits.signed_by_untrusted_user_unmatched"}}: {{end}}{{.verification.Reason}}">
44
{{if ne .verification.SigningUser.ID 0}}
55
{{svg "gitea-lock"}}
6-
{{avatar .verification.SigningUser "signature"}}
6+
{{avatar .verification.SigningUser 28 "signature"}}
77
{{else}}
88
<span title="{{$.root.i18n.Tr "gpg.default_key"}}">{{svg "gitea-lock-cog"}}</span>
99
{{avatarByEmail .verification.SigningEmail "" 28 "signature"}}

web_src/less/_base.less

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
:root {
22
/* documented customizable variables */
3-
--fonts-proportional: -apple-system, "BlinkMacSystemFont", system-ui, "Segoe UI", "Roboto", "Helvetica", "Arial";
4-
--fonts-monospace: "SF Mono", "Consolas", "Menlo", "Liberation Mono", "Monaco", "Lucida Console", monospace;
5-
--fonts-emoji: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Twemoji Mozilla";
3+
--fonts-proportional: system-ui, -apple-system, "BlinkMacSystemFont", "Segoe UI", "Roboto", "Helvetica Neue", "Arial", "Noto Sans", "Liberation Sans", sans-serif;
4+
--fonts-monospace: "SFMono-Regular", "Menlo", "Monaco", "Consolas", "Liberation Mono", "Courier New", monospace;
5+
--fonts-emoji: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "Twemoji Mozilla";
66
/* other variables */
7-
--fonts-regular: var(--fonts-proportional), var(--fonts-emoji), sans-serif;
7+
--fonts-regular: var(--fonts-proportional), var(--fonts-emoji);
88
--border-radius: .28571429rem;
99
--color-primary: #4183c4;
1010
--color-primary-dark-1: #3876b3;

0 commit comments

Comments
 (0)