Skip to content

Latest commit

 

History

History
 
 

22_mdx-svg

22_mdx-svg

../22_mdx-svg

Example for testing SVG usage within .astro, .md and .mdx

This highlights incompatibility of inlined SVG when injected from remark/rehype plugins in an mdx file

  • attributes with ':' e.g. xmlns:xlink gets treated as .jsx and converted to xmlnsXlink, xmlns or xmlnsxlink, all of which break the SVG rendering

Note :

  • html comments not supported
  • html empty new lines of spaces also break the html parsing as indentation takes precendence

Open in StackBlitz open in Codesandbox open in Gitpod

references