` with classes `markup` and `XXXXX`. The `markup` class provides out of the box styling (as does `markdown` if `XXXXX`==`markdown`). Otherwise can use these classes to specifically target the contents of your rendered HTML.
+The external renderer is specified in the .ini in the format `[markup.XXXXX]` and the HTML supplied by your external renderer will be wrapped in a `
` with classes `markup` and `XXXXX`. The `markup` class provides out of the box styling (as does `markdown` if `XXXXX` is `markdown`). Otherwise you can use these classes to specifically target the contents of your rendered HTML.
And so you could write some Less:
```less
From 67b494de587640430c71e861d2eb238f09303ceb Mon Sep 17 00:00:00 2001
From: HarvsG <11440490+HarvsG@users.noreply.github.com>
Date: Thu, 19 Nov 2020 15:18:04 +0000
Subject: [PATCH 05/18] rename _markdown to _markup
---
web_src/less/_markup.less | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/web_src/less/_markup.less b/web_src/less/_markup.less
index b189dbbdf8af2..54189979b871f 100644
--- a/web_src/less/_markup.less
+++ b/web_src/less/_markup.less
@@ -473,6 +473,34 @@
box-shadow: inset 0 -1px 0 var(--color-secondary);
}
+<<<<<<< HEAD
+=======
+ .csv-data td,
+ .csv-data th {
+ padding: 5px;
+ overflow: hidden;
+ font-size: 12px;
+ line-height: 1;
+ text-align: left;
+ white-space: nowrap;
+ }
+
+ .csv-data .blob-num {
+ padding: 10px 8px 9px;
+ text-align: right;
+ border: 0;
+ }
+
+ .csv-data tr {
+ border-top: 0;
+ }
+
+ .csv-data th {
+ font-weight: 600;
+ border-top: 0;
+ }
+
+>>>>>>> e38bfb88d... rename _markdown to _markup
.ui.list .list,
ol.ui.list ol,
ul.ui.list ul {
From e6f256ceb461e2ca9d19902eb29b391b3e52db53 Mon Sep 17 00:00:00 2001
From: HarvsG <11440490+HarvsG@users.noreply.github.com>
Date: Thu, 19 Nov 2020 15:43:28 +0000
Subject: [PATCH 06/18] remove defunct import
---
web_src/less/index.less | 1 -
1 file changed, 1 deletion(-)
diff --git a/web_src/less/index.less b/web_src/less/index.less
index 967968537ab7d..8702c40fe6ee7 100644
--- a/web_src/less/index.less
+++ b/web_src/less/index.less
@@ -18,7 +18,6 @@
@import "_font_i18n";
@import "_base";
@import "_markup";
-@import "_markdown";
@import "_home";
@import "_install";
@import "_form";
From 82936c5e0422ef65c7051dff897ad1b54b3d6fc6 Mon Sep 17 00:00:00 2001
From: HarvsG <11440490+HarvsG@users.noreply.github.com>
Date: Sat, 17 Apr 2021 13:44:42 +0100
Subject: [PATCH 07/18] fix orphaned reference
---
web_src/js/markdown/mermaid.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/web_src/js/markdown/mermaid.js b/web_src/js/markdown/mermaid.js
index a518bc73451c7..d0aefd1aff978 100644
--- a/web_src/js/markdown/mermaid.js
+++ b/web_src/js/markdown/mermaid.js
@@ -3,7 +3,7 @@ const MAX_SOURCE_CHARACTERS = 5000;
function displayError(el, err) {
el.closest('pre').classList.remove('is-loading');
const errorNode = document.createElement('div');
- errorNode.setAttribute('class', 'ui message error markdown-block-error mono');
+ errorNode.setAttribute('class', 'ui message error markup-block-error mono');
errorNode.textContent = err.str || err.message || String(err);
el.closest('pre').before(errorNode);
}
From 66d633739b28e9b0f17512402e2ef9349c684917 Mon Sep 17 00:00:00 2001
From: HarvsG <11440490+HarvsG@users.noreply.github.com>
Date: Sat, 17 Apr 2021 13:50:29 +0100
Subject: [PATCH 08/18] remove comments
---
web_src/less/_markup.less | 3 ---
1 file changed, 3 deletions(-)
diff --git a/web_src/less/_markup.less b/web_src/less/_markup.less
index 54189979b871f..e5f3613957e9b 100644
--- a/web_src/less/_markup.less
+++ b/web_src/less/_markup.less
@@ -473,8 +473,6 @@
box-shadow: inset 0 -1px 0 var(--color-secondary);
}
-<<<<<<< HEAD
-=======
.csv-data td,
.csv-data th {
padding: 5px;
@@ -500,7 +498,6 @@
border-top: 0;
}
->>>>>>> e38bfb88d... rename _markdown to _markup
.ui.list .list,
ol.ui.list ol,
ul.ui.list ul {
From 29a2f09770090b62b391dcdcc85d2ff0c1522b3e Mon Sep 17 00:00:00 2001
From: HarvsG <11440490+HarvsG@users.noreply.github.com>
Date: Sat, 17 Apr 2021 21:15:46 +0100
Subject: [PATCH 09/18] fix header navigation
---
web_src/js/markdown/anchors.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/web_src/js/markdown/anchors.js b/web_src/js/markdown/anchors.js
index 62bf8c83c37d7..62561fe2504d8 100644
--- a/web_src/js/markdown/anchors.js
+++ b/web_src/js/markdown/anchors.js
@@ -16,7 +16,7 @@ function scrollToAnchor() {
}
export default function initMarkdownAnchors() {
- if (!document.querySelector('.markdown')) return;
+ if (!document.querySelector('.markup')) return;
for (const heading of document.querySelectorAll(headingSelector)) {
const originalId = heading.id.replace(/^user-content-/, '');
From 416b54dc7ff52e7a9892a91c2115c596a8560cd9 Mon Sep 17 00:00:00 2001
From: 6543 <6543@obermui.de>
Date: Wed, 5 May 2021 17:41:40 +0200
Subject: [PATCH 10/18] patch by @silverwind
---
templates/org/home.tmpl | 2 +-
templates/repo/diff/box.tmpl | 2 +-
templates/repo/diff/comment_form.tmpl | 4 ++--
templates/repo/diff/comments.tmpl | 2 +-
templates/repo/editor/edit.tmpl | 2 +-
templates/repo/empty.tmpl | 4 ++--
templates/repo/issue/comment_tab.tmpl | 2 +-
templates/repo/issue/milestone_issues.tmpl | 2 +-
templates/repo/issue/milestones.tmpl | 2 +-
templates/repo/issue/view_content.tmpl | 4 ++--
templates/repo/issue/view_content/comments.tmpl | 8 ++++----
templates/repo/release/list.tmpl | 2 +-
templates/repo/release/new.tmpl | 2 +-
templates/repo/wiki/view.tmpl | 2 +-
templates/user/profile.tmpl | 2 +-
web_src/js/index.js | 4 ++--
web_src/js/markdown/anchors.js | 2 +-
17 files changed, 24 insertions(+), 24 deletions(-)
diff --git a/templates/org/home.tmpl b/templates/org/home.tmpl
index 9b77ae6b3f2ab..5e0a53aa56843 100644
--- a/templates/org/home.tmpl
+++ b/templates/org/home.tmpl
@@ -11,7 +11,7 @@
{{if .IsOrganizationOwner}}
{{svg "octicon-gear" 16 "mb-3"}}{{end}}
{{if .Org.Location}}
{{svg "octicon-location"}} {{.Org.Location}}
{{end}}
{{if .Org.Website}}
{{end}}
diff --git a/templates/repo/diff/box.tmpl b/templates/repo/diff/box.tmpl
index 9a2f7bdd7fed0..582b66d5db6e5 100644
--- a/templates/repo/diff/box.tmpl
+++ b/templates/repo/diff/box.tmpl
@@ -164,7 +164,7 @@
-
+
{{$.i18n.Tr "loading"}}
diff --git a/templates/repo/diff/comment_form.tmpl b/templates/repo/diff/comment_form.tmpl
index c82d32c214d8d..43e902bc89ff1 100644
--- a/templates/repo/diff/comment_form.tmpl
+++ b/templates/repo/diff/comment_form.tmpl
@@ -22,12 +22,12 @@
-
-
+
{{if .RenderedContent}}
{{.RenderedContent|Str2html}}
{{else}}
diff --git a/templates/repo/editor/edit.tmpl b/templates/repo/editor/edit.tmpl
index 3efde70f50885..b7e1589aa14e0 100644
--- a/templates/repo/editor/edit.tmpl
+++ b/templates/repo/editor/edit.tmpl
@@ -44,7 +44,7 @@
{{.FileContent}}
-
+
{{.i18n.Tr "loading"}}
diff --git a/templates/repo/empty.tmpl b/templates/repo/empty.tmpl
index 7dae7c0121660..21c600545639d 100644
--- a/templates/repo/empty.tmpl
+++ b/templates/repo/empty.tmpl
@@ -27,7 +27,7 @@
{{.i18n.Tr "repo.create_new_repo_command"}}
-
+
touch README.md
git init
{{if ne .Repository.DefaultBranch "master"}}git checkout -b {{.Repository.DefaultBranch}}{{end}}
@@ -41,7 +41,7 @@ git push -u origin {{.Repository.DefaultBranch}}
{{.i18n.Tr "repo.push_exist_repo"}}
-
+
git remote add origin {{if $.DisableSSH}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}
git push -u origin {{.Repository.DefaultBranch}}
diff --git a/templates/repo/issue/comment_tab.tmpl b/templates/repo/issue/comment_tab.tmpl
index ab874bdd13697..77e82930dcf90 100644
--- a/templates/repo/issue/comment_tab.tmpl
+++ b/templates/repo/issue/comment_tab.tmpl
@@ -8,7 +8,7 @@
{{- if .BodyQuery}}{{.BodyQuery}}{{else if .IssueTemplate}}{{.IssueTemplate}}{{else if .PullRequestTemplate}}{{.PullRequestTemplate}}{{else}}{{.content}}{{end -}}
-
diff --git a/templates/repo/issue/milestone_issues.tmpl b/templates/repo/issue/milestone_issues.tmpl
index 8c2f36f04bc92..897d297d37cb5 100644
--- a/templates/repo/issue/milestone_issues.tmpl
+++ b/templates/repo/issue/milestone_issues.tmpl
@@ -5,7 +5,7 @@
{{.Milestone.Name}}
-
+
{{.Milestone.RenderedContent|Str2html}}
diff --git a/templates/repo/issue/milestones.tmpl b/templates/repo/issue/milestones.tmpl
index c7d3522abcf47..448d758e3ebfd 100644
--- a/templates/repo/issue/milestones.tmpl
+++ b/templates/repo/issue/milestones.tmpl
@@ -98,7 +98,7 @@
{{end}}
{{if .Content}}
-
+
{{.RenderedContent|Str2html}}
{{end}}
diff --git a/templates/repo/issue/view_content.tmpl b/templates/repo/issue/view_content.tmpl
index 0482604b70292..e353d71ee969a 100644
--- a/templates/repo/issue/view_content.tmpl
+++ b/templates/repo/issue/view_content.tmpl
@@ -57,7 +57,7 @@
-
+
{{if .Issue.RenderedContent}}
{{.Issue.RenderedContent|Str2html}}
{{else}}
@@ -191,7 +191,7 @@
-
+
{{$.i18n.Tr "loading"}}
diff --git a/templates/repo/issue/view_content/comments.tmpl b/templates/repo/issue/view_content/comments.tmpl
index 81f0d0434a28c..4863f7f2f1e0b 100644
--- a/templates/repo/issue/view_content/comments.tmpl
+++ b/templates/repo/issue/view_content/comments.tmpl
@@ -64,7 +64,7 @@
-
+
{{if .RenderedContent}}
{{.RenderedContent|Str2html}}
{{else}}
@@ -442,7 +442,7 @@
-
+
{{if .RenderedContent}}
{{.RenderedContent|Str2html}}
{{else}}
@@ -552,7 +552,7 @@
{{.i18n.Tr "repo.create_new_repo_command"}}
-{{.i18n.Tr "repo.push_exist_repo"}}
-{{.Milestone.Name}}
-