1 | ;
|
2 |
|
3 | exports.type = 'perItem';
|
4 |
|
5 | exports.active = true;
|
6 |
|
7 | exports.description = 'removes doctype declaration';
|
8 |
|
9 | /**
|
10 | * Remove DOCTYPE declaration.
|
11 | *
|
12 | * "Unfortunately the SVG DTDs are a source of so many
|
13 | * issues that the SVG WG has decided not to write one
|
14 | * for the upcoming SVG 1.2 standard. In fact SVG WG
|
15 | * members are even telling people not to use a DOCTYPE
|
16 | * declaration in SVG 1.0 and 1.1 documents"
|
17 | * https://jwatt.org/svg/authoring/#doctype-declaration
|
18 | *
|
19 | * @example
|
20 | * <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
21 | * q"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
22 | *
|
23 | * @example
|
24 | * <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
25 | * "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" [
|
26 | * <!-- an internal subset can be embedded here -->
|
27 | * ]>
|
28 | *
|
29 | * @param {Object} item current iteration item
|
30 | * @return {Boolean} if false, item will be filtered out
|
31 | *
|
32 | * @author Kir Belevich
|
33 | */
|
34 | exports.fn = function(item) {
|
35 |
|
36 | if (item.doctype) {
|
37 | return false;
|
38 | }
|
39 |
|
40 | };
|