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

Fix bug causing code blocks to be rendered inconsistently #530

Merged
merged 2 commits into from
Feb 7, 2025

Conversation

mags0ft
Copy link
Contributor

@mags0ft mags0ft commented Feb 6, 2025

Hello (a third time today!)

I've implemented a patch for the glitchy rendering of some code blocks and the broken table rendering. It seems to be working better now.

Code block rendering

BEFORE:
image

AFTER:
image

Table rendering

BEFORE:
image

AFTER:
image

I URGENTLY ADVISE YOU TO TEST THIS! I'm not quite sure I got everything right, and it'd be a pity if I break something. I did not come across any regressions myself, though (4 test cases checked).

This commit should fix issue #526.
This commit does ALSO fixes the table rendering issue #523.

Best wishes!

@mags0ft
Copy link
Contributor Author

mags0ft commented Feb 6, 2025

Important note: Apparently, this fixes both tables and code blocks, however LaTeX rendering is still buggy. From my current observations, applying these fixes might cause regressions in LaTeX display when used in combination with a reasoning model. I will look into this.

@Jeffser
Copy link
Owner

Jeffser commented Feb 7, 2025

Don't worry about it, I intend on rewriting all of the message generation code, still, thanks for all the help today, I will merge this!

@Jeffser Jeffser merged commit 3826c57 into Jeffser:main Feb 7, 2025
@mags0ft
Copy link
Contributor Author

mags0ft commented Feb 7, 2025

Okay, but please be aware that, as mentioned, this might be a regression in LaTeX rendering then!

A patch may be needed before the entire rewrite of the code is done because this makes the LaTeX rendering feature borderline insufferable - although I don't quite know how many of these bugs come from this patch and how many existed before. Some seem to have been there in the original version.

What I want to say is, I don't know if the code in this state is release-ready yet. But as you said, I'll try not to worry about it, haha.

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.

2 participants