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

Add support for thymeleaf custom html tags/blocks #3294

Open
dimaslanjaka opened this issue Feb 1, 2024 · 0 comments
Open

Add support for thymeleaf custom html tags/blocks #3294

dimaslanjaka opened this issue Feb 1, 2024 · 0 comments

Comments

@dimaslanjaka
Copy link

dimaslanjaka commented Feb 1, 2024

Is your feature request related to a problem? Please describe.
I develop spring boot with thymeleaf engine using VSCode+Redhat Java. in thymeleaf has new element blocks like <th:block> (https://stackoverflow.com/a/68204022/6404439)

my prettierrc.json

{
  "$schema": "https://json.schemastore.org/prettierrc",
  "printWidth": 120,
  "tabWidth": 2,
  "useTabs": false,
  "bracketSameLine": true,
  "bracketSpacing": true,
  "semi": true,
  "singleQuote": true,
  "trailingComma": "none",
  "endOfLine": "lf",
  "quoteProps": "as-needed",
  "htmlWhitespaceSensitivity": "css",
  "singleAttributePerLine": true,
  "overrides": [
    {
      "excludeFiles": [
        "*.min.js",
        "*.min.css",
        "*.min.html",
        "*.min.scss"
      ],
      "files": [
        "*.js",
        "*.css",
        "*.sass",
        "*.html",
        "*.md",
        "*.ts"
      ],
      "options": {
        "semi": true
      }
    },
    {
      "files": [
        "*.ejs",
        "*.html"
      ],
      "options": {
        "parser": "html"
      }
    }
  ]
}

Describe the solution you'd like
I want format the html using Prettier VSCode Plugin.

Additional context

error while formatting custom html tags <th:block/>
image
image

successful without custom blocks
image

@dimaslanjaka dimaslanjaka changed the title Add support for html thymeleaf blocks Add support for thymeleaf custom html tags/blocks Feb 1, 2024
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

No branches or pull requests

1 participant