-
Notifications
You must be signed in to change notification settings - Fork 338
Closed
Labels
plannedFeatures or content that are planned but not yet in progress.Features or content that are planned but not yet in progress.site improvementSomething that improves the website functionalitySomething that improves the website functionality
Description
📋 Explain your issue
For some reason, Prettier does not format fenced code blocks inside JSX unless the following conditions are met:
- There is a blank line at the top and bottom of the block.
- The block starts at the beginning of the line (with no indentation).
For example, Prettier does not recognize the fenced code block in this code:
<TabsCodeBlocks>
<div id="npm">
```bash frame="none"
npm install @macaron-css/core @macaron-css/solid
```
</div>
</TabsCodeBlocks>As a result, it formats it incorrectly like this:
<TabsCodeBlocks>
<div id="npm">
```bash frame="none" npm install @macaron-css/core @macaron-css/solid ```
</div>
</TabsCodeBlocks>To help prevent this issue, I suggest updating the example from the TabsCodeBlocks component. Change it from:
* @example
* // jsx
* <TabsCodeBlocks>
* <div id="npm">
* \```bash frame="none"
* npm install
* \```
* </div>
* <div id="yarn">
* \```bash frame="none"
* yarn install
* \```
* </div>
* ...
* </TabsCodeBlocks>
to something like this:
* @example
* // jsx
* <TabsCodeBlocks>
* <div id="npm">
*
* ```bash frame="none"
* npm install
* ```
*
* </div>
* <div id="yarn">
*
* ```bash frame="none"
* yarn install
* ```
*
* </div>
* ...
* </TabsCodeBlocks>
It would also be helpful to leave a note about this issue too.
Feel free to assign this task to me if you’d like.
Metadata
Metadata
Assignees
Labels
plannedFeatures or content that are planned but not yet in progress.Features or content that are planned but not yet in progress.site improvementSomething that improves the website functionalitySomething that improves the website functionality