-
Notifications
You must be signed in to change notification settings - Fork 20
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
Chat window: wrap code always in code blocks #113
Comments
Thanks for using aider.el and the feedback. I am able to reproduce the issue by enter: "/ask write a example python application to demo how to use But when I check .aider.chat.history.md file, use markdown-mode and did (setq markdown-fontify-code-blocks-natively t), the code block rendering is correct. So it means markdown-mode.el work properly, and we missed something in this function: https://github.com/tninja/aider.el/blob/main/aider-core.el#L48 |
Just let the aider comint session ignore these special characters including __. Confirmed that it work properly on my laptop. Would you mind try the main branch or reinstall from melpa again? |
The problem is not markdown rendering bold or italics, that is the desired behavior, it should render italics when it supposed to, the problem is the output sometimes doesn't have code fences, your fix doesn't address the underlying problem but hides it, that's why I did't follow with your approach in aidermacs. |
Yeah I think you should take care of your stuff, and learn how to be polite
to be other people, especially the original author of your forked repo.
BTW, don’t delete other people’s comment in either Reddit or emacs-china.com.
It is not polite, and it is hiding the problem.
…On Sun, Mar 23, 2025 at 2:06 PM Matthew Zeng ***@***.***> wrote:
The problem is not markdown rendering bold or italics, that *is* the
desired behavior, the problem is the output sometimes doesn't have code
fences, your fix doesn't address the underlying problem but hides it,
that's why I did't to with your approach in aidermacs
<https://github.com/MatthewZMD/aidermacs>.
—
Reply to this email directly, view it on GitHub
<#113 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFOPAIAHCYJOH5HZEOEOR32V4O5ZAVCNFSM6AAAAABZS4BMCKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDONBWGQ3DOMJSGE>
.
You are receiving this because you commented.Message ID: <tninja/aider.
***@***.***>
[image: MatthewZMD]*MatthewZMD* left a comment (tninja/aider.el#113)
<#113 (comment)>
The problem is not markdown rendering bold or italics, that *is* the
desired behavior, the problem is the output sometimes doesn't have code
fences, your fix doesn't address the underlying problem but hides it,
that's why I did't to with your approach in aidermacs
<https://github.com/MatthewZMD/aidermacs>.
—
Reply to this email directly, view it on GitHub
<#113 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFOPAIAHCYJOH5HZEOEOR32V4O5ZAVCNFSM6AAAAABZS4BMCKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDONBWGQ3DOMJSGE>
.
You are receiving this because you commented.Message ID: <tninja/aider.
***@***.***>
|
What are you talking about? I'm not even mod on reddit. This is weird, I'm not authorized to delete comments on reddit. Why start a drama in this issue? I'm just giving my two cents regarding this issue, and only this issue, maybe you stop being so hostile? Your ego is blowing my nose right now. |
Yes it is very weird because it is the first time my comment got deleted by other people (twice or even more). I never see my post got deleted by anybody else. Go back to the problem. There is pros and cons of this fix. Pros: it fix the BOLD text in codeblock, which shouldn't happen in code block. Comparing Pros and Cons, the fix is valuable since codeblock showing original code is more valuable to people, and text rendering properly (only bold or italic) is less important. A better fix to ONLY inhibit BOLD text rendering in codeblock should happen somewhere around this line: https://github.com/tninja/aider.el/blob/main/aider-core.el#L64. It will take more time to investigate. @CeleritasCelery have more experience on the highlight part than me. I would be very appreciate if he is willing to help on this problem, especially if we can still keep using markdown as syntax highlight solution. |
Yeah, he's very knowledgeable in syntax highlighting, that's why I value his inputs, and especially his pull requests. A super nice contributor 👍👍 |
The cons of this fix: it even inhibit BOLD or italic text in regular markdown text outside of code block. Might be OK. Because there is risk that the markdown text beside codeblock could describe the symbol, to help explain the code. For example, |
When the LLM generates code, e. g. during an
/ask
prompt, code is not wrapped within a code block, hence certain characters trigger Markdown (?) formatting instead of being displayed verbatim.E.g. when the LLM generates code like this ...
__MODULE__
is displayed as MODULE in the output.Telling the LLM ... "Wrap code you provide always in code blocks. Otherwise, some characters apply text formatting instead of being displayed verbatim."
... doesn't help either. The LLM complies with this request, which gives me syntax highlighting, but even then double-underscores and other characters that are used for Markdown formatting still trigger text formatting.
It seems that the chat window's output is basically based on Markdown (?) It would be nice if the user could select org-mode as the underlying output, with code blocks wrapped accordingly.
The text was updated successfully, but these errors were encountered: