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

Code blocks are not wrappable #289

Closed
DrunkenToast opened this issue Jul 15, 2024 · 2 comments · Fixed by #320
Closed

Code blocks are not wrappable #289

DrunkenToast opened this issue Jul 15, 2024 · 2 comments · Fixed by #320

Comments

@DrunkenToast
Copy link
Contributor

DrunkenToast commented Jul 15, 2024

Long text is currently not supported with code blocks, they won't wrap properly as the characters are styled but it wraps after the styling is done.
Preferably it would be wrapped before the styling is applied.

image


Expected outcome (mind the line numbers).

image


I would understand a "Won't fix" label, since styling like this can be a whole can of worms, and ultimately the writer can simply split up the lines himself.

This would however make it easier to present on different screen sizes (especially considering you can create columns) and make line numbers a bit more convenient.

@mfontanini
Copy link
Owner

This is something I'm aware of. Like you say, this could open up a can of worms. Also, in the way this is implemented, highlighting happens during presentation load time so it's not as easy as it sounds to do the wrapping because you only know where the end should be once the presentation is being displayed (as you need to know the window/rect size). I do see the issue though, so I'd like to have a look. It's just not as simple to fix as you'd imagine it should be unless things get moved around quite a bit.

@DrunkenToast
Copy link
Contributor Author

DrunkenToast commented Jul 17, 2024

so it's not as easy as it sounds to do the wrapping

Oh no, don't get me wrong, it sounds terribly difficult!
Working with text is hell-ish!

Just wanted to open this issue so it's being tracked/people can propose solutions :)

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 a pull request may close this issue.

2 participants