$ printf -- 'a \\ b\n'
a \ b
$ printf -- 'a \\ b\n' | cargo run --bin pampa --
[ Para [Str "a", Space, Str "\\ b"] ]
$ printf -- 'a \\ b\n' | cargo run --bin pampa -- -t qmd
a \\ b
$ printf -- 'a \\ b\n' | cargo run --bin pampa -- -t qmd | cargo run --bin pampa --
[ Para [Str "a", Space, Str "\\", Space, Str "b"] ]
A literal backslash followed by a space in inline text parses as a single
Strcontaining the backslash and what follows. The writer emits the backslash as\\, which on re-parse produces a separateStr "\\"plus aSpaceplus the nextStr. Source rendering is equivalent but the AST structure differs.A
\not followed by a space (e.g.foo\bar, or trailing\forLineBreakin a paragraph) round-trips correctly. The shape that triggers this in the wild is a trailing\inside a pipe-table cell (cell padding inserts the space):