diff --git a/build/generate-svg.js b/build/generate-svg.js
index f304795bc019..dc82ed465a20 100755
--- a/build/generate-svg.js
+++ b/build/generate-svg.js
@@ -25,7 +25,7 @@ async function processFile(file, {prefix, fullName} = {}) {
if (prefix === 'octicon') name = name.replace(/-[0-9]+$/, ''); // chop of '-16' on octicons
}
- // keep the `xmlns` attribute so that the files are displayble in standalone documents
+ // Set the `xmlns` attribute so that the files are displayable in standalone documents
// The svg backend module will strip the attribute during startup for inline display
const {data} = optimize(await readFile(file, 'utf8'), {
plugins: [
@@ -33,7 +33,14 @@ async function processFile(file, {prefix, fullName} = {}) {
{name: 'removeDimensions'},
{name: 'prefixIds', params: {prefix: () => name}},
{name: 'addClassesToSVGElement', params: {classNames: ['svg', name]}},
- {name: 'addAttributesToSVGElement', params: {attributes: [{'width': '16'}, {'height': '16'}, {'aria-hidden': 'true'}]}},
+ {
+ name: 'addAttributesToSVGElement', params: {
+ attributes: [
+ {'xmlns': 'http://www.w3.org/2000/svg'},
+ {'width': '16'}, {'height': '16'}, {'aria-hidden': 'true'},
+ ]
+ }
+ },
],
});
diff --git a/public/img/svg/material-invert-colors.svg b/public/img/svg/material-invert-colors.svg
index 018a693a02da..576ec72a785b 100644
--- a/public/img/svg/material-invert-colors.svg
+++ b/public/img/svg/material-invert-colors.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/public/img/svg/material-palette.svg b/public/img/svg/material-palette.svg
index d257e65d3355..f719dadc5d02 100644
--- a/public/img/svg/material-palette.svg
+++ b/public/img/svg/material-palette.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file