Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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>
Comment | File | Size | Author |
---|---|---|---|
#5 | interdiff-3067593-2-5.txt | 2.83 KB | samuel.mortenson |
#5 | 3067593-5.patch | 2.89 KB | samuel.mortenson |
| |||
#2 | tome-export_svgs-3067593.patch | 630 bytes | nikolabintev |
|
Comments
Comment #2
nikolabintev CreditAttribution: nikolabintev commentedI'm uploading a patch that iterates over all `svg` tags and exports their paths from the "xlink:href" attribute
Comment #3
nikolabintev CreditAttribution: nikolabintev commentedComment #4
samuel.mortensonLooks 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.Comment #5
samuel.mortensonAdded tests.
Comment #6
samuel.mortensonComment #8
samuel.mortenson