Disabling multi-line expressions? #2402
-
Hi, is there a way to disable the execution of multi-line expressions(that use After disabling multi-line expressions, I'd expect mathjs to execute only the first line of the multi-line expression or just throw a syntax error and not execute any statement. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
There is no built-in option, but you can do some pre/post processing to throw an error or something in case the user entered a multi line expression. Some ideas:
|
Beta Was this translation helpful? Give feedback.
There is no built-in option, but you can do some pre/post processing to throw an error or something in case the user entered a multi line expression. Some ideas:
ResultSet
, if so, throw an errorBlockNode
, throw an error. If not, execute the parsed expression.