Skip to content

Conversation

@terhechte
Copy link

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.

terhechte added 3 commits June 7, 2020 09:41
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
Copy link

😀

Copy link

@Jagger1976 Jagger1976 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanx

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.

3 participants