aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/render-msg.js10
-rw-r--r--lib/render.js8
-rw-r--r--lib/serve.js3
3 files changed, 11 insertions, 10 deletions
diff --git a/lib/render-msg.js b/lib/render-msg.js
index 48a5777..8346baf 100644
--- a/lib/render-msg.js
+++ b/lib/render-msg.js
@@ -536,7 +536,7 @@ RenderMsg.prototype.gitUpdate = function (cb) {
return h('li', h('a', {href: self.render.toUrl(path)},
h('code', String(commit.sha1).substr(0, 8))), ' ',
self.linkify(String(commit.title)),
- self.gitCommitBody(commit.body)
+ self.render.gitCommitBody(commit.body)
)
})) : '',
Array.isArray(self.c.tags) ?
@@ -559,14 +559,6 @@ RenderMsg.prototype.gitUpdate = function (cb) {
})
}
-RenderMsg.prototype.gitCommitBody = function (body) {
- if (!body) return ''
- var isMarkdown = !/^# Conflicts:$/m.test(body)
- return isMarkdown
- ? h('div', {innerHTML: this.render.markdown('\n' + body)})
- : h('pre', this.linkify('\n' + body))
-}
-
RenderMsg.prototype.gitPullRequest = function (cb) {
var self = this
var done = multicb({pluck: 1, spread: true})
diff --git a/lib/render.js b/lib/render.js
index 21cdbda..d28f4b4 100644
--- a/lib/render.js
+++ b/lib/render.js
@@ -304,3 +304,11 @@ Render.prototype.renderFeeds = function (opts) {
self.renderMsg(msg, opts, cb)
}, 4)
}
+
+Render.prototype.gitCommitBody = function (body) {
+ if (!body) return ''
+ var isMarkdown = !/^# Conflicts:$/m.test(body)
+ return isMarkdown
+ ? h('div', {innerHTML: this.markdown('\n' + body)})
+ : h('pre', this.linkify('\n' + body))
+}
diff --git a/lib/serve.js b/lib/serve.js
index 9d5eb82..d2510e1 100644
--- a/lib/serve.js
+++ b/lib/serve.js
@@ -1438,7 +1438,8 @@ Serve.prototype.gitCommit = function (rev) {
pull.once(commit.tree),
self.gitObjectLinks(obj.msg.key, 'tree')
)]) : '',
- h('pre', self.app.render.linkify(commit.body)).outerHTML,
+ h('blockquote',
+ self.app.render.gitCommitBody(commit.body)).outerHTML,
]
]),
self.wrapPage('git commit ' + rev),