This gives behavior that comes closer to LaTeX's own. If we don't absorb the following newline, it gets interpreted as a SoftBreak, inserting a spurious space in some contexts.
348 B
348 B
% pandoc -f latex -t native
\newcommand\arrow\to
$a\arrow b$
^D
[ Para [ Math InlineMath "a\\to\nb" ] ]
% pandoc -f latex -t native
\newcommand\pfeil[1]{\to #1}
$a\pfeil b$
^D
[ Para [ Math InlineMath "a\\to b" ] ]
% pandoc -f latex -t native
\newcommand\fleche{\to}
$a\fleche b$
^D
[ Para [ Math InlineMath "a\\to b" ] ]