From 22195a7a06ce2f8f1b1c50f589aebb8431bfb2d4 Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 9 Feb 2017 20:32:45 +0900 Subject: [PATCH] =?UTF-8?q?=E8=B2=A0=E3=81=AE=E6=95=B0=E3=82=B5=E3=83=9D?= =?UTF-8?q?=E3=83=BC=E3=83=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/text/elements/code.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/text/elements/code.js b/src/common/text/elements/code.js index 1e1ad00bf..05756a922 100644 --- a/src/common/text/elements/code.js +++ b/src/common/text/elements/code.js @@ -172,8 +172,8 @@ const elements = [ (code, i, source) => { const prev = source[i - 1]; if (prev && /[a-zA-Z]/.test(prev)) return null; - if (!/^[0-9]+/.test(code)) return null; - const match = code.match(/^[0-9]+/)[0]; + if (!/^\-?[0-9]+/.test(code)) return null; + const match = code.match(/^\-?[0-9-]+/)[0]; if (match) { return { html: `${match}`,