Markdown Parser

I've created an AI chat App in node.js. but the output I'm getting is in markdown format. So I'm creating this FR to add this parser please.

I’m getting this output.

https://www.google.com/url?sa=t&source=web&rct=j&opi=89978449&url=https://github.com/markedjs/marked&ved=2ahUKEwiOldSkkKOQAxWyVqQEHdPlM-sQFnoECCAQAQ&usg=AOvVaw1JBUcpcl9VZRjPdhQPzYCL

This do?

perhaps better option would be to add dmx-md in addition to dmx-text and dmx-html in the dynamic attributes

1 Like

Absolutely yes. Thanks @Hyperbytes

1 Like

It will much better :relieved_face:

You might want to clarify if this feature request is for a server-side or client-side parser :slight_smile:

I've also renamed the title to Markdown Parser, because "Marked" is not understood it relates to Markdown (unless one knows about this parser already)

1 Like

I think it should be client-side. Like <span dmx-md=”output_content”></span>

2 Likes

@Hyperbytes , I’ve used your custom extension. md2html and got these results.

All formatting are good except tables. Tables are not coming as expected. Please check.

I will take a look when i get a chance although i am not sure what can be done
The parsing is actually done by an npm called showdown
https://www.npmjs.com/package/showdown

If the issue is in that all i can do is contact the developer and see if they will address that.
Alternatively i could look at an alternative parser but that wont be for a while.
Suggest you add an instruction not to add tables for the minute :grinning_face:

1 Like

Quick suggestion. Why not update your application to prettify any markdown in its output?

Prompt:


Process and render the markdown content in the response as readable, human-friendly text. The output should not show markdown syntax but instead display the properly formatted version.

For example:

  • Make headings appear as large bold titles.
  • Bold and italicized text should be displayed as bold and italicized text, not markdown symbols.
  • Lists should appear as properly formatted bullet points.
  • Links should be clickable and display as normal text (e.g., 'Click here' for a URL).
  • Code blocks should appear as properly formatted code sections (monospaced font, indented).
  • Blockquotes should be indented with the relevant text styled accordingly.
  • Images should appear as embedded images if applicable.

Please convert the markdown into readable, visually pleasing text without showing the raw markdown syntax.


Would help if I got it the right way round! :laughing:

1 Like