mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2025-03-04 07:18:50 -07:00
負の数サポート
This commit is contained in:
parent
e992a5d5d6
commit
e379d69953
1 changed files with 2 additions and 2 deletions
|
@ -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: `<span class="number">${match}</span>`,
|
||||
|
|
Loading…
Add table
Reference in a new issue