Problem/Motivation

I am in a case where we re-use SVGs and they are not getting exported.

SVG's markup:
<svg><use xlink:href="/some-icon.svg"></use></svg></span>

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nikolabintev created an issue. See original summary.

nikolabintev’s picture

I'm uploading a patch that iterates over all `svg` tags and exports their paths from the "xlink:href" attribute

nikolabintev’s picture

Status: Active » Needs review
samuel.mortenson’s picture

Looks good, thanks @nikolabintev! This does need tests added to \Drupal\Tests\tome_static\Kernel\StaticGeneratorTest::testComplexHtml but I can probably do that before commit next week if no one else adds it before then.

samuel.mortenson’s picture

Added tests.

samuel.mortenson’s picture

Status: Needs review » Fixed

  • samuel.mortenson authored fc72404 on 8.x-1.x
    Issue #3067593 by samuel.mortenson, nikolabintev: Export referenced SVGs
    
samuel.mortenson’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.