Skip to content

render-pipeline: a body blank between two macro arguments is dropped (\newcommand{\two}[2]{#1 #2}, (\two{a}{b}) → ab) #949

Description

@jay3332

Found by the #925 lane (PR for expansion/optional-arg-spans-925). With \newcommand{\two}[2]{#1 #2}, (\two{a}{b}) sets ab — the blank in the macro body between the two parameters is lost. Pre-existing and independent of #919/#925 (those fixed the gap around an invocation). Seam: adapter.rs token_gap / BodyCursor — when the gap between two replacement tokens lies inside the macro body (between #1 and #2), read the body bytes between the parameter markers, not the invocation's argument bytes. Test alongside tests/macro_boundary_space.rs; oracle pdflatex.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions