question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Description markdown code blocks labeled `jsx` don't get formatted

See original GitHub issue

In demo.mjs, if you have this content:

/**
 * ```js
 * let   a
 * ```
 * 
 * ```jsx
 * let   a
 * ```
 */

After formatting the content formats to this:

/**
 * ```js
 * let a;
 * ```
 *
 * ```jsx
 * let   a
 * ```
 */

As you can see, the JSDoc description markdown code block labeled js gets formatted but the one labeled jsx doesn’t.

If you try that same markdown in a demo.md file, after formatting both the js and jsx labeled code blocks are correctly formatted by Prettier, proving that this Prettier plugin is somehow not recognizing all the labels that Prettier can normally format.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

0reactions
jaydensericcommented, Nov 5, 2021

@hosseinmd thanks for the speedy fixes, you’re doing a champion job 🙌

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Markdown: A Thorough Guide With Markdown Examples
In this article, we'll explore what Markdown and react-markdown are, why to use react-markdown, and how to use them in a React application....
Read more >
A guide to Markdown on Discord. - gists · GitHub
Discord uses Markdown, a simple plain text formatting system that'll help you ... your message in a code block, and it'll escape the...
Read more >
How to safely render Markdown using react-markdown
Learn how to safely render Markdown syntax to the appropriate HTML with this short react-markdown tutorial.
Read more >
Format messages - Mattermost Documentation
Use Markdown. You can also format your messages in Mattermost using Markdown to control text styling, links, headings, lists, code blocks, in-line code ......
Read more >
Marked does not render code snippet and table correctly
Code block does not have background color; Table is lacking of cell border. I'm using marked package and nextjs to render the markdown...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found