Skip to content

Commit

Permalink
Remove SVG definitions from source code snippet
Browse files Browse the repository at this point in the history
  • Loading branch information
Valerie Young authored and mcking65 committed Dec 13, 2020
1 parent c857a6a commit f6d179e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion examples/js/examples.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,10 @@ aria.widget.SourceCode.prototype.createCode = function (

switch (childNode.nodeType) {
case Node.ELEMENT_NODE:
this.createCode(sourceCodeNode, childNode, indentLevel, false);
// To remove the SVG definitions from the example's source code, add the id `svg_definitions`
if (childNode.id !== 'svg_definitions') {
this.createCode(sourceCodeNode, childNode, indentLevel, false);
}
break;

case Node.TEXT_NODE:
Expand Down

0 comments on commit f6d179e

Please sign in to comment.