summaryrefslogtreecommitdiffstats
path: root/modules/markup/html.go
diff options
context:
space:
mode:
authorJimmy Praet <jimmy.praet@ksz-bcss.fgov.be>2020-12-03 11:50:47 +0100
committerGitHub <noreply@github.com>2020-12-03 11:50:47 +0100
commit056b8f5b52fc0e9ab32f99c016e1ee28975c4bcd (patch)
tree143cc94f5ded3ec1897bd509e30351149c691170 /modules/markup/html.go
parent18712eab791fe3c4cd6fa959eb1ab4b75c935cb3 (diff)
downloadgitea-056b8f5b52fc0e9ab32f99c016e1ee28975c4bcd.tar.gz
gitea-056b8f5b52fc0e9ab32f99c016e1ee28975c4bcd.zip
Clickable links in pull request (and issue) titles (#13695)
* clickable links in pull request (and issue) titles #13658 reuses the existing logic to render clickable links in commit messages * dedicated RenderIssueTitle function applied patch from @mrsdizzie
Diffstat (limited to 'modules/markup/html.go')
-rw-r--r--modules/markup/html.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/modules/markup/html.go b/modules/markup/html.go
index f5f811b59b..a6c6649cd3 100644
--- a/modules/markup/html.go
+++ b/modules/markup/html.go
@@ -268,6 +268,25 @@ func RenderCommitMessageSubject(
return ctx.postProcess(rawHTML)
}
+// RenderIssueTitle to process title on individual issue/pull page
+func RenderIssueTitle(
+ rawHTML []byte,
+ urlPrefix string,
+ metas map[string]string,
+) ([]byte, error) {
+ ctx := &postProcessCtx{
+ metas: metas,
+ urlPrefix: urlPrefix,
+ procs: []processor{
+ issueIndexPatternProcessor,
+ sha1CurrentPatternProcessor,
+ emojiShortCodeProcessor,
+ emojiProcessor,
+ },
+ }
+ return ctx.postProcess(rawHTML)
+}
+
// RenderDescriptionHTML will use similar logic as PostProcess, but will
// use a single special linkProcessor.
func RenderDescriptionHTML(