From c2584beaff926d9980ee413908294aade40065ab Mon Sep 17 00:00:00 2001 From: Bidens Date: Sun, 8 Nov 2015 17:13:38 +0800 Subject: [PATCH] =?UTF-8?q?fix=20windows=E6=8D=A2=E8=A1=8C=E7=AC=A6"\r\n"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复在windows下测试不通过。 --- common/render_helper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/render_helper.js b/common/render_helper.js index 460520b585..3f458d7710 100644 --- a/common/render_helper.js +++ b/common/render_helper.js @@ -68,7 +68,7 @@ exports.markdown = function (text) { exports.multiline = multiline; exports.escapeSignature = function (signature) { - return signature.split('\n').map(function (p) { + return signature.split(/\r\n|\n/).map(function (p) { return _.escape(p); }).join('
'); };