Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle ^^Ms inside formatted "lines" #46

Merged
merged 1 commit into from
May 13, 2021
Merged

Conversation

jkuczm
Copy link
Owner

@jkuczm jkuczm commented May 13, 2021

When listings-fancyverb interface is switched on \FancyVerbFormatLine command set by listings can't handle carriage return (^^M) characters passed to it. Although it's intended to format individual lines, when commandchars are set, commands with arguments containing newlines are passed to \FancyVerbFormatLine as single "lines". This leads to infinite compilation.

As a workaround all ^^Ms are replaced by \emptys before tokens are passed to formatting command.

Fixes newline issue from #20#issuecomment-212977239.

When `listings`-`fancyverb` interface is switched on
`\FancyVerbFormatLine` command set by `listings` can't handle carriage
return (`^^M`) characters passed to it. Although it's intended to format
individual lines, when `commandchars` are set, commands with arguments
containing newlines are passed to `\FancyVerbFormatLine` as single
"lines". This leads to infinite compilation.

As a workaround all `^^M`s are replaced by `\empty`s before tokens are
passed to formatting command.
@jkuczm jkuczm added the bug label May 13, 2021
@jkuczm jkuczm added this to the 0.3.3 milestone May 13, 2021
@jkuczm jkuczm merged commit c6850d3 into master May 13, 2021
@jkuczm jkuczm deleted the fix_newlines_in_args branch May 13, 2021 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant