diff --git a/src/common/text/elements/code.js b/src/common/text/elements/code.js index 05756a9227..2220bb1b80 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}`,