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

New options: --keep-plus-minus-markers and --color-only #122

Merged
merged 4 commits into from Apr 12, 2020

Conversation

dandavison
Copy link
Owner

  • --color-only

Do not alter the input in any way other than applying colors. Equivalent to --keep-plus-minus-markers --width variable --tabs 0 --commit-style plain --file-style plain --hunk-style plain.

  • --keep-plus-minus-markers

Prefix added/removed lines with a +/- character, respectively, exactly as git does. The default behavior is to output a space character in place of these markers.

At the parent commit da47330, some lines are being incorrectly
truncated at word boundaries. It's something to do with an interaction
between (a) the changes made in da47330 in order to implement
--retain-plus-minus-markers, and (b) the logic in tokenize(). This
commit works around that by reinstating the leading space character
during tokenization and syntax highlighting, and then removing it
afterwards in a hacky way.
@dandavison dandavison merged commit c16f479 into master Apr 12, 2020
@dandavison dandavison deleted the keep-plus-minus-markers branch January 1, 2021 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant