diff --git a/src/Banner.js b/src/Banner.js index 0b0832f..6c1856c 100644 --- a/src/Banner.js +++ b/src/Banner.js @@ -218,7 +218,7 @@ export default function Banner() {
GitHub diff --git a/src/TextArea.js b/src/TextArea.js index ac6f565..523c2b3 100644 --- a/src/TextArea.js +++ b/src/TextArea.js @@ -68,6 +68,10 @@ export default function App() { const getResultFromInput = ({ input, parser }) => { try { + // Pre-parse input + // Used to ignore underscores in numbers to enable rust-like syntax + input = input.replace(/\b([\d_]+)/gi, (match) => (match.replace(/_/gi,''))); + const result = parser.evaluate(input); if (typeof result === 'number') {