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 aren't rendered properly #526

Open
chenxiex opened this issue Feb 6, 2025 · 3 comments
Open

Code blocks aren't rendered properly #526

chenxiex opened this issue Feb 6, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@chenxiex
Copy link

chenxiex commented Feb 6, 2025

Describe the bug
When there are multiple code blocks in one generation, some of them aren't rendered.

Expected behavior
All the code blocks are rendered properly.

Screenshots

Image

The second code block, which contains a bash command, isn't rendered.

Debugging information
Here is the markdown source code of the generation.

https://pastebin.com/XYKLGZnn

@chenxiex chenxiex added the bug Something isn't working label Feb 6, 2025
@mags0ft
Copy link
Contributor

mags0ft commented Feb 6, 2025

Could successfully reproduce this bug.

Image

@mags0ft
Copy link
Contributor

mags0ft commented Feb 6, 2025

Okay, this seems to be coming from a regex issue (line 36-37 in src/custom_widgets/message_widget.py). I'm investigating it.

Edit: The regexes seem to be fine, it's the code handling that causes this to behave a bit quirky. I'm still on it trying to isolate the issue.

@mags0ft
Copy link
Contributor

mags0ft commented Feb 6, 2025

I have fixed the issue and will deploy a pull request soon. Further testing is probably required, though.

mags0ft added a commit to mags0ft/Alpaca that referenced this issue Feb 6, 2025
Jeffser pushed a commit that referenced this issue Feb 7, 2025
* Fix bug causing code blocks to be rendered inconsistently

This commit should fix issue #526 (#526).

* patch out broken table rendering
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants