This fixes a bug and adds a feature#111
Open
terhechte wants to merge 4 commits intoJohnSundell:masterfrom
Open
This fixes a bug and adds a feature#111terhechte wants to merge 4 commits intoJohnSundell:masterfrom
terhechte wants to merge 4 commits intoJohnSundell:masterfrom
Conversation
This adds a test which fails because Splash inserts additional whitespace at the beginning of code if the code has empty lines before it starts.
It seems that `\n` is identified as a valid token and then the same substring (`\n`) is both inserted as whitespace and as a token. This causes the insertion of additional whitespace at the beginning of the code.
This would allow using a custom monospace font for highlighting. This is especially useful if, say, the code is embedded into some sort of presentation 😊. An assert could be added to make sure the font is monospace, but I feel like that's not required. If somebody wants to display their code in Comic Sans, all the more power to them
|
😀 |
jefferycline1
approved these changes
Nov 14, 2021
jefferycline1
approved these changes
Apr 4, 2022
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains a cleaned up version of #109. It also contains additional tests for AttributedString processing particularly because they make it easy to spot a bug where Splash introduces additional newlines at the top of source code. This PR also contains a fix for that bug.