
Including a number in a remark after a formula results in that number being appended to the formula. Example: "/roll 1d20+12 to hit for swing 1" is evaluated as "1d20+121". The same thing happens whether you type it in directly or code it in a macro.
A workaround is to escape all in-line remarks with a "\". Example: "/roll 1d20+12 \to hit for swing 1" is parsed correctly.