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

Format svg tags in the same way html tags are formatted #10455

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Artur-
Copy link

@Artur- Artur- commented Mar 1, 2021

Description

lit-html uses svg template tag for rendering svgs or embedding svgs inside html. This change enables prettier to format the contents of the svg tag.

Checklist

  • I’ve added tests to confirm my change works.
  • (If changing the API or CLI) I’ve documented the changes I’ve made (in the docs/ directory).
  • (If the change is user-facing) I’ve added my changes to changelog_unreleased/*/XXXX.md file following changelog_unreleased/TEMPLATE.md.
  • I’ve read the contributing guidelines.

Try the playground for this PR

@thorn0
Copy link
Member

thorn0 commented Mar 1, 2021

Unfortunately, changes like this are currently blocked by #5588. Until a solution for that is found and implemented, we can't move forward with adding more embedded syntaxes since they are inherently an unsafe transformation. Thus the more Prettier adds them the less reliable it gets. There were already cases where such changes had to be reverted. We can't know who else and how uses the svg template tag.

Similar blocked PRs: #8647, #5993

#5588 is open for proposals.

@fisker fisker mentioned this pull request Nov 3, 2022
3 tasks
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 this pull request may close these issues.

None yet

2 participants