Use a generic markup class to display externally rendered files and diffs #15735
No reviewers
Labels
No Label
backport/done
backport/v1.0
backport/v1.1
backport/v1.10
backport/v1.11
backport/v1.12
backport/v1.13
backport/v1.14
backport/v1.15
backport/v1.2
backport/v1.3
backport/v1.4
backport/v1.5
backport/v1.6
backport/v1.7
backport/v1.8
backport/v1.9
bounty
changelog
dependencies
frontport/done
frontport/main
good first issue
Hacktoberfest
hacktoberfest-accepted
in progress
kind/api
kind/breaking
kind/bug
kind/build
kind/deployment
kind/deprecated
kind/docs
kind/enhancement
kind/feature
kind/lint
kind/misc
kind/moderation
kind/package
kind/proposal
kind/question
kind/refactor
kind/regression
kind/security
kind/summary
kind/testing
kind/translation
kind/ui
kind/upstream-related
kind/usability
kind/ux
lgtm/done
lgtm/need 1
lgtm/need 2
performance/bigrepo
performance/cpu
performance/memory
performance/speed
priority/critical
priority/low
priority/maybe
priority/medium
proposal/rejected
reviewed/confirmed
reviewed/duplicate
reviewed/fixed
reviewed/invalid
reviewed/not-a-bug
reviewed/wontfix
skip-changelog
stale
status/blocked
status/needs-feedback
status/wip
theme/2fa
theme/authentication
theme/avatar
theme/backup-restore
theme/docker
theme/federation
theme/issues
theme/kanban
theme/markdown
theme/migration
theme/mobile
theme/pr
theme/signing
theme/sqlite
theme/timetracker
theme/webhook
theme/wiki
No Milestone
No project
No Assignees
2 Participants
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: lunny/gitea#15735
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "markup"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This pull is based on #12261
This PR will be a follow-on from https://github.com/go-gitea/gitea/issues/8299 and https://github.com/go-gitea/gitea/issues/7614.
It builds on the work done in https://github.com/go-gitea/gitea/pull/8300 and the patch https://github.com/go-gitea/gitea/pull/8357
The idea is to have a generic class
.markup
that has some default rendering, that is near identical to the current.markdown
More details
The current
.markdown
is defined athttps://github.com/go-gitea/gitea/blob/master/web_src/less/_markdown.less
and overwritten at:
84a419de98/web_src/less/themes/theme-arc-green.less (L851-L885)
and
84a419de98/web_src/less/themes/theme-arc-green.less (L1856-L1867)
⚠️ BREAKING ⚠️
Administrators with css/less customization targeting the
.markdown
class should update these to use.markup
.American variant is probably more proper for docs.
Maybe drop this
:not(code)
and see what breaks, if anything at all? Might need to check git history why it was added in first place.No relevant matches.
Git history points to it being related to webhook:
c2ca103d30
.Webhook delivery list looks fine with the removal, let's do this.
Pushed this change.
{{if ne "csv" .MarkupType}}{{end}}
was noop here, fyi.@ -0,0 +473,4 @@
kbd {
display: inline-block;
padding: 3px 5px;
font-size: 11px;
Where do these come from? I see no related CSS class changes, are they dead code?
@ -0,0 +473,4 @@
kbd {
display: inline-block;
padding: 3px 5px;
font-size: 11px;
no idear either
@ -0,0 +473,4 @@
kbd {
display: inline-block;
padding: 3px 5px;
font-size: 11px;
I think @HarvsG might have added them during testing and Github's CSS includes a same-name class but given that we never actually output such HTML in first place, let's remove it. If CSV rendering it added to our markdown, the CSS for it should be added along with that.
@ -0,0 +473,4 @@
kbd {
display: inline-block;
padding: 3px 5px;
font-size: 11px;
Removed them.
LGTM from my side ... :)
@ -0,0 +12,4 @@
} else if (id.startsWith('user-content-')) { // compat for links with old 'user-content-' prefixed hashes
const el = document.getElementById(id);
if (el) el.scrollIntoView();
}
initMarkupAnchors
?@ -0,0 +12,4 @@
} else if (id.startsWith('user-content-')) { // compat for links with old 'user-content-' prefixed hashes
const el = document.getElementById(id);
if (el) el.scrollIntoView();
}
Fixed, renamed and changed these to named exports.