From 62e534e643aaff947daf23c8d48f2c50aa39bd4e Mon Sep 17 00:00:00 2001 From: anekos Date: Sat, 20 Mar 2010 11:07:30 +0000 Subject: 改行をエスケープするように git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@37070 d0d07461-0603-4401-acd4-de1884942a52 --- reporter.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'reporter.js') diff --git a/reporter.js b/reporter.js index 83296d0..abf5746 100755 --- a/reporter.js +++ b/reporter.js @@ -149,7 +149,11 @@ let PLUGIN_INFO = }, preferences: function (file, {'-length-limit': limit}) { - function quote(str) + // TODO エスケープ処理など怪しいので調べる + function esc (str) + (typeof str === 'string' ? str.replace(/\n/g, '\\n') : str); + + function quote (str) (typeof str === 'string' ? Commands.quoteArg["'"](str) : str); function compareByName ([n1,], [n2,]) -- cgit v1.2.3