-
-
Notifications
You must be signed in to change notification settings - Fork 398
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pager friendly terminal formatting (#1006)
Let's say a pager, like [moar](https://github.com/walles/moar) (uses Chroma for syntax highlighting) or `less`, shows a line in the middle of a file. Unless that line starts with the correct formatting for the line, the pager would have to scan the whole file from the start to get the coloring of this single line right. Before this PR, lines were not guaranteed to start with formatting, but could sometimes rely on formatting from the preceding lines. With this change in place, lines can now stand by themselves, and paging will work better on Chroma's output. Missing formatting at the start of the line would happen when a token had a linefeed in the middle.
- Loading branch information
Showing
2 changed files
with
56 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters