diff options
author | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2017-06-02 18:34:51 -1000 |
---|---|---|
committer | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2017-06-02 18:34:51 -1000 |
commit | 2aa94754c9a09e5ea707a30c6e937b7bfb3dd05a (patch) | |
tree | c491defc88a61197d37afa024e9b8d2c1c7253cc /lib/render-msg.js | |
parent | ae9162cbf72e851a7349aa0579ba695bfa9be6b5 (diff) | |
download | patchfoo-2aa94754c9a09e5ea707a30c6e937b7bfb3dd05a.tar.gz patchfoo-2aa94754c9a09e5ea707a30c6e937b7bfb3dd05a.zip |
Use existing function for rendering git commit bodies
Diffstat (limited to 'lib/render-msg.js')
-rw-r--r-- | lib/render-msg.js | 10 |
1 files changed, 1 insertions, 9 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}) |