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

Svg use tag wrongly formatted #68

Open
kuon opened this issue Aug 2, 2021 · 0 comments
Open

Svg use tag wrongly formatted #68

kuon opened this issue Aug 2, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@kuon
Copy link

kuon commented Aug 2, 2021

The following snippet:

 <div phx-click="toggle_password"
        phx-hook="focus"
        id="toggle_password"
        data-focus="credentials_password"
        class="absolute right-0 top-0 py-1 px-2 bg-gray-900 h-8 flex items-center">
        <svg height="24px"
          width="24px"
          viewBox="0 0 100 100">
          <%= if @show_password do %>
          <use href="/icons/eye_crossed.svg#icon"></use>
          <% else %>
          <use href="/icons/eye.svg#icon"></use>
          <% end %>
        </svg>
      </div>

gets formatted to

<div
  phx-click="toggle_password"
  phx-hook="focus"
  id="toggle_password"
  data-focus="credentials_password"
  class="absolute right-0 top-0 py-1 px-2 bg-gray-900 h-8 flex items-center"
>
  <svg height="24px" width="24px" viewBox="0 0 100 100">
    <%= if @show_password do %>
      <use href="/icons/eye_crossed.svg#icon"></use>

    <% else %>
      <usehref="/icons/eye.svg#icon"></use>
    <% end %>
  </svg>
</div>

The use tag is altered to usehref and there is a newline inserted before the else.

[email protected]
[email protected]

Erlang/OTP 24 [erts-12.0] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [jit]

Elixir 1.12.1 (compiled with Erlang/OTP 24)
@adamzapasnik adamzapasnik added the bug Something isn't working label Sep 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants