-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Account for inline boxes when collapsing after newlines (#280)
Followup (small bug fix) to #254 which didn't take inline boxes into account. That PR was checking whether "the last character is whitespace" without checking whether the last thing pushed into the layout was text. So if the sequence of items pushed to a layout was something like: - inline box - whitespace - inline box - whitespace - inline box - whitespace - inline box (an example which would be "status badges" in Github readme's which are typically images separated by whitespace characters) Then all but the first "whitespace" would get collapsed as it would be incorrectly detected as directly adjacent to the preceding whitespace (even though it shouldn't because there is an inline box in between). This PR fixes this issue by tracking the kind of the last item pushed. --------- Signed-off-by: Nico Burns <[email protected]>
- Loading branch information
Showing
4 changed files
with
65 additions
and
5 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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.