Skip to content
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

Blockquotes are incorrectly collapsed into a single paragraph #230

Open
sxxov opened this issue Mar 24, 2024 · 0 comments · May be fixed by #231
Open

Blockquotes are incorrectly collapsed into a single paragraph #230

sxxov opened this issue Mar 24, 2024 · 0 comments · May be fixed by #231

Comments

@sxxov
Copy link
Contributor

sxxov commented Mar 24, 2024

Summary

Blockquotes are not consistently handled when formatted vs unformatted, & thus when either:

  1. Running prettier twice
  2. Using a tool that runs prettier multiple times (e.g. eslint)

Then, blockquotes within JSDoc comments will be collapsed into a single paragraph.

Repro

https://github.com/sxxov/prettier-plugin-jsdoc--blockquote-repro

The repo contains the test case "Block quote". Running the following command will run prettier twice on the test case:

npm run start

Which will output:

/**
 * > ```js
 * > > A block quote
 * > ```> Turns into> ```js
 * > A block quote
 * > ```
 *
 * Sdssasdassd
 */

instead of:

/**
 * > ```js
 * > > A block quote
 * > ```
 *
 * > Turns into
 *
 * > ```js
 * > A block quote
 * > ```
 *
 * Sdssasdassd
 */
@sxxov sxxov linked a pull request Mar 24, 2024 that will close this issue
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 a pull request may close this issue.

1 participant