This commit is contained in:
syuilo 2017-02-10 01:28:47 +09:00
parent 3bd14138f2
commit c85fdd005b

View file

@ -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: `<span class="number">${match}</span>`,