parse5 4.0.0-test → 5.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +14 -16
  3. package/lib/common/doctype.js +114 -108
  4. package/lib/common/error-codes.js +65 -0
  5. package/lib/common/foreign-content.js +265 -0
  6. package/lib/common/html.js +102 -102
  7. package/lib/common/unicode.js +81 -19
  8. package/lib/extensions/error-reporting/mixin-base.js +43 -0
  9. package/lib/extensions/error-reporting/parser-mixin.js +52 -0
  10. package/lib/extensions/error-reporting/preprocessor-mixin.js +24 -0
  11. package/lib/extensions/error-reporting/tokenizer-mixin.js +17 -0
  12. package/lib/extensions/location-info/open-element-stack-mixin.js +35 -0
  13. package/lib/extensions/location-info/parser-mixin.js +222 -0
  14. package/lib/extensions/location-info/tokenizer-mixin.js +146 -0
  15. package/lib/extensions/position-tracking/preprocessor-mixin.js +64 -0
  16. package/lib/index.js +6 -43
  17. package/lib/parser/formatting-element-list.js +181 -0
  18. package/lib/parser/index.js +1469 -1332
  19. package/lib/parser/open-element-stack.js +482 -0
  20. package/lib/serializer/index.js +136 -122
  21. package/lib/tokenizer/index.js +1856 -1804
  22. package/lib/tokenizer/{named_entity_data.js → named-entity-data.js} +1 -1
  23. package/lib/tokenizer/preprocessor.js +115 -103
  24. package/lib/tree-adapters/default.js +217 -0
  25. package/lib/utils/{merge_options.js → merge-options.js} +2 -2
  26. package/lib/utils/mixin.js +33 -12
  27. package/package.json +33 -58
  28. package/lib/common/foreign_content.js +0 -260
  29. package/lib/extensions/location_info/open_element_stack_mixin.js +0 -34
  30. package/lib/extensions/location_info/parser_mixin.js +0 -213
  31. package/lib/extensions/location_info/tokenizer_mixin.js +0 -117
  32. package/lib/extensions/position_tracking/preprocessor_mixin.js +0 -72
  33. package/lib/index.d.ts +0 -1077
  34. package/lib/parser/formatting_element_list.js +0 -167
  35. package/lib/parser/open_element_stack.js +0 -395
  36. package/lib/parser/parser_stream.js +0 -76
  37. package/lib/parser/plain_text_conversion_stream.js +0 -20
  38. package/lib/sax/dev_null_stream.js +0 -14
  39. package/lib/sax/index.js +0 -118
  40. package/lib/sax/parser_feedback_simulator.js +0 -153
  41. package/lib/serializer/serializer_stream.js +0 -28
  42. package/lib/tree_adapters/default.js +0 -209
  43. package/lib/tree_adapters/htmlparser2.js +0 -338
package/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2013-2016 Ivan Nikulin (ifaaan@gmail.com, https://github.com/inikulin)
1
+ Copyright (c) 2013-2019 Ivan Nikulin (ifaaan@gmail.com, https://github.com/inikulin)
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -4,31 +4,29 @@
4
4
  </a>
5
5
  </p>
6
6
 
7
- <p align="center">
8
- <i>HTML parsing/serialization toolset for Node.js. <a href="https://html.spec.whatwg.org/multipage/">WHATWG HTML Living Standard (aka HTML5)</a>-compliant.</i>
9
- </p>
7
+ <div align="center">
8
+ <h1>parse5</h1>
9
+ <i><b>HTML parser and serializer.</b></i>
10
+ </div>
11
+ <br>
10
12
 
11
- <p align="center">
12
- <a href="https://travis-ci.org/inikulin/parse5"><img alt="Build Status" src="https://api.travis-ci.org/inikulin/parse5.svg"></a>
13
- <a href="https://www.npmjs.com/package/parse5"><img alt="NPM Version" src="https://img.shields.io/npm/v/parse5.svg"></a>
14
- <a href="https://npmjs.org/package/parse5"><img alt="Downloads" src="http://img.shields.io/npm/dm/parse5.svg"></a>
15
- <a href="https://npmjs.org/package/parse5"><img alt="Downloads total" src="http://img.shields.io/npm/dt/parse5.svg"></a>
16
- </p>
13
+ <div align="center">
14
+ <code>npm install --save parse5</code>
15
+ </div>
16
+ <br>
17
17
 
18
18
  <p align="center">
19
- <b><i>parse5</i></b> provides nearly everything you may need when dealing with HTML. It's the fastest spec-compliant HTML parser
20
- for Node to date. It parses HTML the way the latest version of your browser does. It has proven itself reliable in such projects
21
- as <a href="https://github.com/tmpvar/jsdom">jsdom</a>, <a href="https://github.com/angular/angular">Angular2</a>, <a href="https://www.polymer-project.org">Polymer</a> and many more.
19
+ 📖 <a href="https://github.com/inikulin/parse5/tree/master/packages/parse5/docs/index.md"><b>Documentation</b></a> 📖
22
20
  </p>
23
21
 
24
- ----
22
+ ---
25
23
 
26
24
  <p align="center">
27
- <a href="http://inikulin.github.io/parse5">Documentation</a>
25
+ <a href="https://github.com/inikulin/parse5/tree/master/docs/list-of-packages.md">List of parse5 toolset packages</a>
28
26
  </p>
29
27
 
30
28
  <p align="center">
31
- <a href="http://inikulin.github.io/parse5#version-history">Version history</a>
29
+ <a href="https://github.com/inikulin/parse5">GitHub</a>
32
30
  </p>
33
31
 
34
32
  <p align="center">
@@ -36,5 +34,5 @@ as <a href="https://github.com/tmpvar/jsdom">jsdom</a>, <a href="https://github.
36
34
  </p>
37
35
 
38
36
  <p align="center">
39
- <a href="https://github.com/inikulin/parse5/issues">Issue tracker</a>
37
+ <a href="https://github.com/inikulin/parse5/tree/master/docs/version-history.md">Version history</a>
40
38
  </p>
@@ -1,156 +1,162 @@
1
1
  'use strict';
2
2
 
3
- var DOCUMENT_MODE = require('./html').DOCUMENT_MODE;
3
+ const { DOCUMENT_MODE } = require('./html');
4
4
 
5
5
  //Const
6
- var VALID_DOCTYPE_NAME = 'html',
7
- QUIRKS_MODE_SYSTEM_ID = 'http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd',
8
- QUIRKS_MODE_PUBLIC_ID_PREFIXES = [
9
- '+//silmaril//dtd html pro v0r11 19970101//en',
10
- '-//advasoft ltd//dtd html 3.0 aswedit + extensions//en',
11
- '-//as//dtd html 3.0 aswedit + extensions//en',
12
- '-//ietf//dtd html 2.0 level 1//en',
13
- '-//ietf//dtd html 2.0 level 2//en',
14
- '-//ietf//dtd html 2.0 strict level 1//en',
15
- '-//ietf//dtd html 2.0 strict level 2//en',
16
- '-//ietf//dtd html 2.0 strict//en',
17
- '-//ietf//dtd html 2.0//en',
18
- '-//ietf//dtd html 2.1e//en',
19
- '-//ietf//dtd html 3.0//en',
20
- '-//ietf//dtd html 3.0//en//',
21
- '-//ietf//dtd html 3.2 final//en',
22
- '-//ietf//dtd html 3.2//en',
23
- '-//ietf//dtd html 3//en',
24
- '-//ietf//dtd html level 0//en',
25
- '-//ietf//dtd html level 0//en//2.0',
26
- '-//ietf//dtd html level 1//en',
27
- '-//ietf//dtd html level 1//en//2.0',
28
- '-//ietf//dtd html level 2//en',
29
- '-//ietf//dtd html level 2//en//2.0',
30
- '-//ietf//dtd html level 3//en',
31
- '-//ietf//dtd html level 3//en//3.0',
32
- '-//ietf//dtd html strict level 0//en',
33
- '-//ietf//dtd html strict level 0//en//2.0',
34
- '-//ietf//dtd html strict level 1//en',
35
- '-//ietf//dtd html strict level 1//en//2.0',
36
- '-//ietf//dtd html strict level 2//en',
37
- '-//ietf//dtd html strict level 2//en//2.0',
38
- '-//ietf//dtd html strict level 3//en',
39
- '-//ietf//dtd html strict level 3//en//3.0',
40
- '-//ietf//dtd html strict//en',
41
- '-//ietf//dtd html strict//en//2.0',
42
- '-//ietf//dtd html strict//en//3.0',
43
- '-//ietf//dtd html//en',
44
- '-//ietf//dtd html//en//2.0',
45
- '-//ietf//dtd html//en//3.0',
46
- '-//metrius//dtd metrius presentational//en',
47
- '-//microsoft//dtd internet explorer 2.0 html strict//en',
48
- '-//microsoft//dtd internet explorer 2.0 html//en',
49
- '-//microsoft//dtd internet explorer 2.0 tables//en',
50
- '-//microsoft//dtd internet explorer 3.0 html strict//en',
51
- '-//microsoft//dtd internet explorer 3.0 html//en',
52
- '-//microsoft//dtd internet explorer 3.0 tables//en',
53
- '-//netscape comm. corp.//dtd html//en',
54
- '-//netscape comm. corp.//dtd strict html//en',
55
- '-//o\'reilly and associates//dtd html 2.0//en',
56
- '-//o\'reilly and associates//dtd html extended 1.0//en',
57
- '-//spyglass//dtd html 2.0 extended//en',
58
- '-//sq//dtd html 2.0 hotmetal + extensions//en',
59
- '-//sun microsystems corp.//dtd hotjava html//en',
60
- '-//sun microsystems corp.//dtd hotjava strict html//en',
61
- '-//w3c//dtd html 3 1995-03-24//en',
62
- '-//w3c//dtd html 3.2 draft//en',
63
- '-//w3c//dtd html 3.2 final//en',
64
- '-//w3c//dtd html 3.2//en',
65
- '-//w3c//dtd html 3.2s draft//en',
66
- '-//w3c//dtd html 4.0 frameset//en',
67
- '-//w3c//dtd html 4.0 transitional//en',
68
- '-//w3c//dtd html experimental 19960712//en',
69
- '-//w3c//dtd html experimental 970421//en',
70
- '-//w3c//dtd w3 html//en',
71
- '-//w3o//dtd w3 html 3.0//en',
72
- '-//w3o//dtd w3 html 3.0//en//',
73
- '-//webtechs//dtd mozilla html 2.0//en',
74
- '-//webtechs//dtd mozilla html//en'
75
- ],
76
- QUIRKS_MODE_NO_SYSTEM_ID_PUBLIC_ID_PREFIXES = QUIRKS_MODE_PUBLIC_ID_PREFIXES.concat([
77
- '-//w3c//dtd html 4.01 frameset//',
78
- '-//w3c//dtd html 4.01 transitional//'
79
- ]),
80
- QUIRKS_MODE_PUBLIC_IDS = [
81
- '-//w3o//dtd w3 html strict 3.0//en//',
82
- '-/w3c/dtd html 4.0 transitional/en',
83
- 'html'
84
- ],
85
- LIMITED_QUIRKS_PUBLIC_ID_PREFIXES = [
86
- '-//W3C//DTD XHTML 1.0 Frameset//',
87
- '-//W3C//DTD XHTML 1.0 Transitional//'
88
- ],
89
- LIMITED_QUIRKS_WITH_SYSTEM_ID_PUBLIC_ID_PREFIXES = LIMITED_QUIRKS_PUBLIC_ID_PREFIXES.concat([
90
- '-//W3C//DTD HTML 4.01 Frameset//',
91
- '-//W3C//DTD HTML 4.01 Transitional//'
92
- ]);
93
-
6
+ const VALID_DOCTYPE_NAME = 'html';
7
+ const VALID_SYSTEM_ID = 'about:legacy-compat';
8
+ const QUIRKS_MODE_SYSTEM_ID = 'http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd';
9
+
10
+ const QUIRKS_MODE_PUBLIC_ID_PREFIXES = [
11
+ '+//silmaril//dtd html pro v0r11 19970101//',
12
+ '-//as//dtd html 3.0 aswedit + extensions//',
13
+ '-//advasoft ltd//dtd html 3.0 aswedit + extensions//',
14
+ '-//ietf//dtd html 2.0 level 1//',
15
+ '-//ietf//dtd html 2.0 level 2//',
16
+ '-//ietf//dtd html 2.0 strict level 1//',
17
+ '-//ietf//dtd html 2.0 strict level 2//',
18
+ '-//ietf//dtd html 2.0 strict//',
19
+ '-//ietf//dtd html 2.0//',
20
+ '-//ietf//dtd html 2.1e//',
21
+ '-//ietf//dtd html 3.0//',
22
+ '-//ietf//dtd html 3.2 final//',
23
+ '-//ietf//dtd html 3.2//',
24
+ '-//ietf//dtd html 3//',
25
+ '-//ietf//dtd html level 0//',
26
+ '-//ietf//dtd html level 1//',
27
+ '-//ietf//dtd html level 2//',
28
+ '-//ietf//dtd html level 3//',
29
+ '-//ietf//dtd html strict level 0//',
30
+ '-//ietf//dtd html strict level 1//',
31
+ '-//ietf//dtd html strict level 2//',
32
+ '-//ietf//dtd html strict level 3//',
33
+ '-//ietf//dtd html strict//',
34
+ '-//ietf//dtd html//',
35
+ '-//metrius//dtd metrius presentational//',
36
+ '-//microsoft//dtd internet explorer 2.0 html strict//',
37
+ '-//microsoft//dtd internet explorer 2.0 html//',
38
+ '-//microsoft//dtd internet explorer 2.0 tables//',
39
+ '-//microsoft//dtd internet explorer 3.0 html strict//',
40
+ '-//microsoft//dtd internet explorer 3.0 html//',
41
+ '-//microsoft//dtd internet explorer 3.0 tables//',
42
+ '-//netscape comm. corp.//dtd html//',
43
+ '-//netscape comm. corp.//dtd strict html//',
44
+ "-//o'reilly and associates//dtd html 2.0//",
45
+ "-//o'reilly and associates//dtd html extended 1.0//",
46
+ "-//o'reilly and associates//dtd html extended relaxed 1.0//",
47
+ '-//sq//dtd html 2.0 hotmetal + extensions//',
48
+ '-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//',
49
+ '-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//',
50
+ '-//spyglass//dtd html 2.0 extended//',
51
+ '-//sun microsystems corp.//dtd hotjava html//',
52
+ '-//sun microsystems corp.//dtd hotjava strict html//',
53
+ '-//w3c//dtd html 3 1995-03-24//',
54
+ '-//w3c//dtd html 3.2 draft//',
55
+ '-//w3c//dtd html 3.2 final//',
56
+ '-//w3c//dtd html 3.2//',
57
+ '-//w3c//dtd html 3.2s draft//',
58
+ '-//w3c//dtd html 4.0 frameset//',
59
+ '-//w3c//dtd html 4.0 transitional//',
60
+ '-//w3c//dtd html experimental 19960712//',
61
+ '-//w3c//dtd html experimental 970421//',
62
+ '-//w3c//dtd w3 html//',
63
+ '-//w3o//dtd w3 html 3.0//',
64
+ '-//webtechs//dtd mozilla html 2.0//',
65
+ '-//webtechs//dtd mozilla html//'
66
+ ];
67
+
68
+ const QUIRKS_MODE_NO_SYSTEM_ID_PUBLIC_ID_PREFIXES = QUIRKS_MODE_PUBLIC_ID_PREFIXES.concat([
69
+ '-//w3c//dtd html 4.01 frameset//',
70
+ '-//w3c//dtd html 4.01 transitional//'
71
+ ]);
72
+
73
+ const QUIRKS_MODE_PUBLIC_IDS = ['-//w3o//dtd w3 html strict 3.0//en//', '-/w3c/dtd html 4.0 transitional/en', 'html'];
74
+ const LIMITED_QUIRKS_PUBLIC_ID_PREFIXES = ['-//w3c//dtd xhtml 1.0 frameset//', '-//w3c//dtd xhtml 1.0 transitional//'];
75
+
76
+ const LIMITED_QUIRKS_WITH_SYSTEM_ID_PUBLIC_ID_PREFIXES = LIMITED_QUIRKS_PUBLIC_ID_PREFIXES.concat([
77
+ '-//w3c//dtd html 4.01 frameset//',
78
+ '-//w3c//dtd html 4.01 transitional//'
79
+ ]);
94
80
 
95
81
  //Utils
96
82
  function enquoteDoctypeId(id) {
97
- var quote = id.indexOf('"') !== -1 ? '\'' : '"';
83
+ const quote = id.indexOf('"') !== -1 ? "'" : '"';
98
84
 
99
85
  return quote + id + quote;
100
86
  }
101
87
 
102
88
  function hasPrefix(publicId, prefixes) {
103
- for (var i = 0; i < prefixes.length; i++) {
104
- if (publicId.indexOf(prefixes[i]) === 0)
89
+ for (let i = 0; i < prefixes.length; i++) {
90
+ if (publicId.indexOf(prefixes[i]) === 0) {
105
91
  return true;
92
+ }
106
93
  }
107
94
 
108
95
  return false;
109
96
  }
110
97
 
111
-
112
98
  //API
113
- exports.getDocumentMode = function (name, publicId, systemId) {
114
- if (name !== VALID_DOCTYPE_NAME)
99
+ exports.isConforming = function(token) {
100
+ return (
101
+ token.name === VALID_DOCTYPE_NAME &&
102
+ token.publicId === null &&
103
+ (token.systemId === null || token.systemId === VALID_SYSTEM_ID)
104
+ );
105
+ };
106
+
107
+ exports.getDocumentMode = function(token) {
108
+ if (token.name !== VALID_DOCTYPE_NAME) {
115
109
  return DOCUMENT_MODE.QUIRKS;
110
+ }
111
+
112
+ const systemId = token.systemId;
116
113
 
117
- if (systemId && systemId.toLowerCase() === QUIRKS_MODE_SYSTEM_ID)
114
+ if (systemId && systemId.toLowerCase() === QUIRKS_MODE_SYSTEM_ID) {
118
115
  return DOCUMENT_MODE.QUIRKS;
116
+ }
117
+
118
+ let publicId = token.publicId;
119
119
 
120
120
  if (publicId !== null) {
121
121
  publicId = publicId.toLowerCase();
122
122
 
123
- if (QUIRKS_MODE_PUBLIC_IDS.indexOf(publicId) > -1)
123
+ if (QUIRKS_MODE_PUBLIC_IDS.indexOf(publicId) > -1) {
124
124
  return DOCUMENT_MODE.QUIRKS;
125
+ }
125
126
 
126
- var prefixes = systemId === null ? QUIRKS_MODE_NO_SYSTEM_ID_PUBLIC_ID_PREFIXES : QUIRKS_MODE_PUBLIC_ID_PREFIXES;
127
+ let prefixes = systemId === null ? QUIRKS_MODE_NO_SYSTEM_ID_PUBLIC_ID_PREFIXES : QUIRKS_MODE_PUBLIC_ID_PREFIXES;
127
128
 
128
- if (hasPrefix(publicId, prefixes))
129
+ if (hasPrefix(publicId, prefixes)) {
129
130
  return DOCUMENT_MODE.QUIRKS;
131
+ }
130
132
 
131
- prefixes = systemId === null ? LIMITED_QUIRKS_PUBLIC_ID_PREFIXES : LIMITED_QUIRKS_WITH_SYSTEM_ID_PUBLIC_ID_PREFIXES;
133
+ prefixes =
134
+ systemId === null ? LIMITED_QUIRKS_PUBLIC_ID_PREFIXES : LIMITED_QUIRKS_WITH_SYSTEM_ID_PUBLIC_ID_PREFIXES;
132
135
 
133
- if (hasPrefix(publicId, prefixes))
136
+ if (hasPrefix(publicId, prefixes)) {
134
137
  return DOCUMENT_MODE.LIMITED_QUIRKS;
138
+ }
135
139
  }
136
140
 
137
141
  return DOCUMENT_MODE.NO_QUIRKS;
138
142
  };
139
143
 
140
- exports.serializeContent = function (name, publicId, systemId) {
141
- var str = '!DOCTYPE ';
144
+ exports.serializeContent = function(name, publicId, systemId) {
145
+ let str = '!DOCTYPE ';
142
146
 
143
- if (name)
147
+ if (name) {
144
148
  str += name;
149
+ }
145
150
 
146
- if (publicId !== null)
151
+ if (publicId) {
147
152
  str += ' PUBLIC ' + enquoteDoctypeId(publicId);
148
-
149
- else if (systemId !== null)
153
+ } else if (systemId) {
150
154
  str += ' SYSTEM';
155
+ }
151
156
 
152
- if (systemId !== null)
157
+ if (systemId !== null) {
153
158
  str += ' ' + enquoteDoctypeId(systemId);
159
+ }
154
160
 
155
161
  return str;
156
162
  };
@@ -0,0 +1,65 @@
1
+ 'use strict';
2
+
3
+ module.exports = {
4
+ controlCharacterInInputStream: 'control-character-in-input-stream',
5
+ noncharacterInInputStream: 'noncharacter-in-input-stream',
6
+ surrogateInInputStream: 'surrogate-in-input-stream',
7
+ nonVoidHtmlElementStartTagWithTrailingSolidus: 'non-void-html-element-start-tag-with-trailing-solidus',
8
+ endTagWithAttributes: 'end-tag-with-attributes',
9
+ endTagWithTrailingSolidus: 'end-tag-with-trailing-solidus',
10
+ unexpectedSolidusInTag: 'unexpected-solidus-in-tag',
11
+ unexpectedNullCharacter: 'unexpected-null-character',
12
+ unexpectedQuestionMarkInsteadOfTagName: 'unexpected-question-mark-instead-of-tag-name',
13
+ invalidFirstCharacterOfTagName: 'invalid-first-character-of-tag-name',
14
+ unexpectedEqualsSignBeforeAttributeName: 'unexpected-equals-sign-before-attribute-name',
15
+ missingEndTagName: 'missing-end-tag-name',
16
+ unexpectedCharacterInAttributeName: 'unexpected-character-in-attribute-name',
17
+ unknownNamedCharacterReference: 'unknown-named-character-reference',
18
+ missingSemicolonAfterCharacterReference: 'missing-semicolon-after-character-reference',
19
+ unexpectedCharacterAfterDoctypeSystemIdentifier: 'unexpected-character-after-doctype-system-identifier',
20
+ unexpectedCharacterInUnquotedAttributeValue: 'unexpected-character-in-unquoted-attribute-value',
21
+ eofBeforeTagName: 'eof-before-tag-name',
22
+ eofInTag: 'eof-in-tag',
23
+ missingAttributeValue: 'missing-attribute-value',
24
+ missingWhitespaceBetweenAttributes: 'missing-whitespace-between-attributes',
25
+ missingWhitespaceAfterDoctypePublicKeyword: 'missing-whitespace-after-doctype-public-keyword',
26
+ missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers:
27
+ 'missing-whitespace-between-doctype-public-and-system-identifiers',
28
+ missingWhitespaceAfterDoctypeSystemKeyword: 'missing-whitespace-after-doctype-system-keyword',
29
+ missingQuoteBeforeDoctypePublicIdentifier: 'missing-quote-before-doctype-public-identifier',
30
+ missingQuoteBeforeDoctypeSystemIdentifier: 'missing-quote-before-doctype-system-identifier',
31
+ missingDoctypePublicIdentifier: 'missing-doctype-public-identifier',
32
+ missingDoctypeSystemIdentifier: 'missing-doctype-system-identifier',
33
+ abruptDoctypePublicIdentifier: 'abrupt-doctype-public-identifier',
34
+ abruptDoctypeSystemIdentifier: 'abrupt-doctype-system-identifier',
35
+ cdataInHtmlContent: 'cdata-in-html-content',
36
+ incorrectlyOpenedComment: 'incorrectly-opened-comment',
37
+ eofInScriptHtmlCommentLikeText: 'eof-in-script-html-comment-like-text',
38
+ eofInDoctype: 'eof-in-doctype',
39
+ nestedComment: 'nested-comment',
40
+ abruptClosingOfEmptyComment: 'abrupt-closing-of-empty-comment',
41
+ eofInComment: 'eof-in-comment',
42
+ incorrectlyClosedComment: 'incorrectly-closed-comment',
43
+ eofInCdata: 'eof-in-cdata',
44
+ absenceOfDigitsInNumericCharacterReference: 'absence-of-digits-in-numeric-character-reference',
45
+ nullCharacterReference: 'null-character-reference',
46
+ surrogateCharacterReference: 'surrogate-character-reference',
47
+ characterReferenceOutsideUnicodeRange: 'character-reference-outside-unicode-range',
48
+ controlCharacterReference: 'control-character-reference',
49
+ noncharacterCharacterReference: 'noncharacter-character-reference',
50
+ missingWhitespaceBeforeDoctypeName: 'missing-whitespace-before-doctype-name',
51
+ missingDoctypeName: 'missing-doctype-name',
52
+ invalidCharacterSequenceAfterDoctypeName: 'invalid-character-sequence-after-doctype-name',
53
+ duplicateAttribute: 'duplicate-attribute',
54
+ nonConformingDoctype: 'non-conforming-doctype',
55
+ missingDoctype: 'missing-doctype',
56
+ misplacedDoctype: 'misplaced-doctype',
57
+ endTagWithoutMatchingOpenElement: 'end-tag-without-matching-open-element',
58
+ closingOfElementWithOpenChildElements: 'closing-of-element-with-open-child-elements',
59
+ disallowedContentInNoscriptInHead: 'disallowed-content-in-noscript-in-head',
60
+ openElementsLeftAfterEof: 'open-elements-left-after-eof',
61
+ abandonedHeadElementChild: 'abandoned-head-element-child',
62
+ misplacedStartTagForHeadElement: 'misplaced-start-tag-for-head-element',
63
+ nestedNoscriptInHead: 'nested-noscript-in-head',
64
+ eofInElementThatCanContainOnlyText: 'eof-in-element-that-can-contain-only-text'
65
+ };