facebook / docusaurus

Easy to maintain open source documentation websites.
https://docusaurus.io
MIT License
56.87k stars 8.56k forks source link

Inline SVGs text font-family is removed when rendering. #10537

Open MrCroxx opened 1 month ago

MrCroxx commented 1 month ago

Have you read the Contributing Guidelines on issues?

Prerequisites

Description

I'm using inline SVGs to render a SVG with customized font-family. But the font-family is not right when rendering. I checked the rendered inline SVG and the original one, found the font-family is removed.

image image

Reproducible demo

No response

Steps to reproduce

  1. Customize font-family in a SVG.
  2. Render it via inline SVG.
  3. tada

Expected behavior

The font-family property should be reserved.

Actual behavior

The font-family property is removed.

Your environment

Self-service

MrCroxx commented 1 month ago

Checked with SVGR playground, the """ is treated as normal text and cause the bug.

MrCroxx commented 1 month ago

FYI https://github.com/gregberge/svgr/issues/963