From c85fdd005b444256a78a9fffa41bb33ce0d30e9c Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 10 Feb 2017 01:28:47 +0900 Subject: [PATCH] Fix bug --- 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 1e9d570880..772d3ed2e7 100644 --- a/src/common/text/elements/code.js +++ b/src/common/text/elements/code.js @@ -261,8 +261,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}`,