prettier / plugin-pug

Prettier Pug Plugin
https://prettier.github.io/plugin-pug
MIT License
196 stars 44 forks source link

Bug: Tag interpolation not formatted correctly within piped text #486

Open alexis-aquanty opened 3 months ago

alexis-aquanty commented 3 months ago

Info

Tool Version
Plugin v3.0.0
Prettier v3.2.5
Framework Vue
Node v18.19.0
OS Linux

Prettier config

{
    "plugins": ["@prettier/plugin-pug"],
    "endOfLine": "auto",
    "pugAttributeSeparator": "none",
    "pugCommentPreserveSpaces": "keep-leading",
    "overrides": [
        {
            "files": "*.md",
            "options": {
                "tabWidth": 2
            }
        }
    ]
}

Input

div
    | #[strong foo] bar
    | #[strong foo] bar

Output or Error

div
    |#[strong foo] bar
    |         #[strong foo] bar

Expected Output

div
    | #[strong foo] bar
    | #[strong foo] bar
Shinigami92 commented 3 months ago

I will bring the project to a new status of dev dependencies and so on Would you like to create a PR afterwards?


Edit: ok, you can start now

alexis-aquanty commented 3 months ago

I will bring the project to a new status of dev dependencies and so on Would you like to create a PR afterwards?

Edit: ok, you can start now

I'm not familiar with this codebase and work is keeping me pretty busy for now, so it may be a while before I can look into this myself.

Shinigami92 commented 3 months ago
  1. git clone git@github.com:prettier/plugin-pug.git
  2. install pnpm or use npm corepack
  3. pnpm run preflight
  4. add tests, and debug/console.log yourself through the src codebase