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

Cannot use <use> (in <svg>) any more #1771

Closed
jbg opened this issue Feb 28, 2021 · 1 comment · Fixed by #1772
Closed

Cannot use <use> (in <svg>) any more #1771

jbg opened this issue Feb 28, 2021 · 1 comment · Fixed by #1772
Assignees
Labels
bug macro Issues relating to our procedural or declarative macros

Comments

@jbg
Copy link
Contributor

jbg commented Feb 28, 2021

As of #1738 being merged, I can't use <use> inside <svg> in html! {} any more. (Maybe other SVG elements are affected too; I haven't tried.) For example, the following:

html!{
  <a class="btn btn-primary" href="https://example.org/">
    <svg class="bi" fill="currentColor">
      <use href="/bootstrap-icons.svg#wrench"/>
    </svg>
    <span>{"Go to example.org"}</span>
  </a>
}

fails with this error:

error: expected a valid html element
   --> src/pages/example.rs:140:19
    |
140 |                   <use href="/bootstrap-icons.svg#wrench"/>
    |                   ^

Originally posted by @jbg in #1738 (comment)

@siku2 siku2 added bug macro Issues relating to our procedural or declarative macros labels Feb 28, 2021
@siku2 siku2 self-assigned this Feb 28, 2021
@siku2
Copy link
Member

siku2 commented Feb 28, 2021

There we go, thanks for the report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug macro Issues relating to our procedural or declarative macros
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants