Skip to content

fix(assistant): use extended markdown for all NcRichText (renders tables)#613

Merged
janepie merged 2 commits into
nextcloud:mainfrom
dtump:fix/chat-extended-markdown
Jul 23, 2026
Merged

fix(assistant): use extended markdown for all NcRichText (renders tables)#613
janepie merged 2 commits into
nextcloud:mainfrom
dtump:fix/chat-extended-markdown

Conversation

@dtump

@dtump dtump commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Chat messages are rendered in markdown mode, not extended markdown, so tables aren't rendered. I'm not sure if this is what others want, but AI often outputs tables and, in my opinion, users expect those tables to render correctly. At least that's what I'd like to see, so if others agree, I propose switching to extended markdown. This complements #540 (which left tables out) and also addresses #497. Tested on NC 33 / Assistant 3.5.0. I verified that both a Markdown table and a code block (with syntax highlighting) now render correctly.

Disclosure: I used AI assistance (Claude Code) to locate the relevant prop and prepare this change; I reviewed and tested it myself.

Update (per review): dropped the now-redundant use-markdown and switched all NcRichText usages to use-extended-markdown for uniformity, so this also covers the reasoning content, the "Work with text" output, and ContextChatSource (finishing the tables part #540 left out).

Proof that after this change it correctly renders tables and code blocks:

image image

Chat messages used use-markdown (CommonMark), so GFM tables did not render.
Enable use-extended-markdown on the chat NcRichText so tables and code
highlighting render.

Assisted-by: ClaudeCode:claude-opus-4-8
Signed-off-by: Dick Tump <dick@tump.me>
@janepie

janepie commented Jul 23, 2026

Copy link
Copy Markdown
Member

Sounds good, let's do it! You can delete :use-markdown="true" in that case, it's not needed anymore.
Could you do the same change in every case we use markdown right now? Let's have some uniformity there :)

…ant use-markdown

use-extended-markdown already enables markdown rendering, so drop the now-redundant use-markdown and switch every remaining use-markdown usage to use-extended-markdown for uniform GFM rendering, per review. Covers the chat message and reasoning content, the TextInput output, and ContextChatSource.

Assisted-by: ClaudeCode:claude-opus-4-8
Signed-off-by: Dick Tump <dick@tump.me>
@dtump dtump changed the title fix(assistant): render extended markdown (tables) in chat messages fix(assistant): use extended markdown for all NcRichText (renders tables) Jul 23, 2026
@dtump

dtump commented Jul 23, 2026

Copy link
Copy Markdown
Contributor Author

Awesome! And thx for the feedback. I (+ Claude 😄) added the commit addressing your feedback, I think this should be sufficient?

@janepie
janepie self-requested a review July 23, 2026 12:48

@janepie janepie left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks a lot 🚀

@janepie
janepie merged commit c0573ff into nextcloud:main Jul 23, 2026
9 checks passed
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