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 tags are a special case #138

Closed
stephannv opened this issue Apr 21, 2023 · 1 comment · Fixed by #139
Closed

SVG tags are a special case #138

stephannv opened this issue Apr 21, 2023 · 1 comment · Fixed by #139

Comments

@stephannv
Copy link
Contributor

ERB Input:

<svg>
  <feSpecularLighting>
    <fePointLight/>
  </feSpecularLighting>    
</svg>

Output:

svg { fespecularlighting { fepointlight } }

Expected output:

# `el` is just a random name
svg { |el| el.feSpecularLighting { el.fePointLight } }
# or
svg do |el|
  el.feSpecularLighting do 
    el.fePointLight
  end
end

There are two problems:

  • Phlex uses yielded svg to build svg tags
  • SVG tag methods uses camelCase pattern, downcase method names results on NoMethodError
@marcoroth
Copy link
Owner

Oh right, this changed recently! Thanks for the report.

I guess we can add a special case for handling SVG elements in Phlexing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants