Issue representing '<' in multi-line codeblocks

#471
by aarmn - opened

Hello there!

I was using the Zephyr model, and I noticed that the code blocks generated in the chat interface have an issue with parsing the '<' character. Here's an example:

image.png

I believe this issue arises due to the chat interface handling the '<' character mainly through converting it to the text form for safety reasons, to prevent it from being interpreted as an HTML tag. However, the library used for displaying code blocks also performs its own magic to handle these conditions, expecting a '<' as input. This results in double escaping and causes the issue.

I'm new to the HF community section, so if I'm not posting this in the right place, please let me know.

Thank you for your attention to this matter.

update: this issue cannot be recreated in js and html, I'm assuming it has smth to do with model, or, the markdown codeblock tag name, aka the text after backticks
update 2: it's caused by the quoted (with indentation) codeblocks, has nothing to do with the tag

shedding some more light on the problem:

image.png

The code above makes the problem you see in the image
I told model to recreate it using ```sh and it didnt have the same issue, so I now have only two guess,
it's a problem which happens when both qouted and wrapped with multiline code block
it's a problem with unnamed multiline codeblocks
I also checked if its the open < at the end which causes, but it has nothing to do with the issue

update: its caused by the quoted (with indentation) codeblocks, has nothing to do with the tag

Sign up or log in to comment