Skip to content

printWidth ignored for attributes with long text in it #214

@alexanderniebuhr

Description

@alexanderniebuhr

why is the svg path not break down into multiple lines?

<svg
  xmlns="http://www.w3.org/2000/svg"
  xmlns:xlink="http://www.w3.org/1999/xlink"
  aria-hidden="true"
  focusable="false"
  role="img"
  class="animate-spin text-5xl dark:text-white"
  width="1em"
  height="1em"
  preserveAspectRatio="xMidYMid meet"
  viewBox="0 0 1024 1024"
  style="transform: rotate(360deg)"
>
  <path
    d="M512 1024c-69.1 0-136.2-13.5-199.3-40.2C251.7 958 197 921 150 874c-47-47-84-101.7-109.8-162.7C13.5 648.2 0 581.1 0 512c0-19.9 16.1-36 36-36s36 16.1 36 36c0 59.4 11.6 117 34.6 171.3c22.2 52.4 53.9 99.5 94.3 139.9c40.4 40.4 87.5 72.2 139.9 94.3C395 940.4 452.6 952 512 952c59.4 0 117-11.6 171.3-34.6c52.4-22.2 99.5-53.9 139.9-94.3c40.4-40.4 72.2-87.5 94.3-139.9C940.4 629 952 571.4 952 512c0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 0 0-94.3-139.9a437.71 437.71 0 0 0-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.2C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7c26.7 63.1 40.2 130.2 40.2 199.3s-13.5 136.2-40.2 199.3C958 772.3 921 827 874 874c-47 47-101.8 83.9-162.7 109.7c-63.1 26.8-130.2 40.3-199.3 40.3z"
    fill="currentColor"
  />
</svg>
# .prettierrc.yml
svelteSortOrder: options-scripts-markup-styles
svelteStrictMode: false
svelteAllowShorthand: true
svelteBracketNewLine: true
svelteIndentScriptAndStyle: true
printWidth: 80
endOfLine: "lf"
semi: false
useTabs: false
tabWidth: 2
//versions
    "prettier": "^2.2.1",
    "prettier-plugin-svelte": "^2.2.0",
//vscode setting
  "[svelte]": {
    "editor.defaultFormatter": "svelte.svelte-vscode"
  },

Metadata

Metadata

Assignees

No one assigned

    Labels

    wontfixThis will not be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions