|
1 | | -import { create } from '../utils/create'; |
2 | | -import { Doctype } from '../types/doctypes'; |
| 1 | +import { Doctype } from './doctypes.types'; |
3 | 2 |
|
4 | | -const validate = create<Doctype>(); |
5 | | - |
6 | | -export const doctypes = validate({ |
7 | | - 'html-5': { |
| 3 | +export const doctypes: Doctype[] = [ |
| 4 | + { |
| 5 | + name: 'HTML 5', |
8 | 6 | description: |
9 | 7 | 'A doctype declaration which is very short, due to its lack of references to a Document Type Definition (DTD) in the form of a URL or FPI. All it contains is the tag name of the root element of the document, HTML.', |
10 | 8 | element: 'html', |
11 | 9 | keyword: null, |
12 | 10 | publicIdentifier: null, |
13 | 11 | systemIdentifier: null, |
14 | 12 | }, |
15 | | - 'html-4.01-strict': { |
| 13 | + { |
| 14 | + name: 'HTML 4.01 Strict', |
16 | 15 | description: |
17 | 16 | 'A strict doctype declaration which validates against the HTML 4.01 spec, although it doesn\'t allow any presentational markup or deprecated elements (such as `<font>` elements) or framesets to be used. It validates loose HTML style markup, such as minimized attributes and non-quoted attributes (eg required, rather than required="required")', |
18 | 17 | element: 'HTML', |
19 | 18 | keyword: 'PUBLIC', |
20 | 19 | publicIdentifier: '-//W3C//DTD HTML 4.01//EN', |
21 | 20 | systemIdentifier: 'http://www.w3.org/TR/html4/strict.dtd', |
22 | 21 | }, |
23 | | - 'html-4.01-transitional': { |
| 22 | + { |
| 23 | + name: 'HTML 4.01 Transitional', |
24 | 24 | description: |
25 | 25 | 'A transitional doctype declaration which validates against the HTML 4.01 spec. It allows some presentational markup and deprecated elements (such as <font> elements) but not framesets. It validates loose HTML style markup, such as minimized attributes and non-quoted attributes (eg required, rather than required="required")', |
26 | 26 | element: 'HTML', |
27 | 27 | keyword: 'PUBLIC', |
28 | 28 | publicIdentifier: '-//W3C//DTD HTML 4.01 Transitional//EN', |
29 | 29 | systemIdentifier: 'http://www.w3.org/TR/html4/loose.dtd', |
30 | 30 | }, |
31 | | - 'xhtml-1.1': { |
| 31 | + { |
| 32 | + name: 'XHTML 1.1', |
32 | 33 | description: '', |
33 | 34 | element: 'html', |
34 | 35 | keyword: 'PUBLIC', |
35 | 36 | publicIdentifier: '-//W3C//DTD XHTML 1.1//EN', |
36 | 37 | systemIdentifier: 'http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd', |
37 | 38 | }, |
38 | | - 'xhtml-1.0-strict': { |
| 39 | + { |
| 40 | + name: 'XHTML 1.0 Strict', |
39 | 41 | description: |
40 | 42 | "A strict doctype declaration which validates against the HTML 4.01 spec, although it doesn't allow any presentational markup or deprecated elements (such as `<font>` elements) or framesets to be used. Unlike the `HTML 4.01 Strict` doctype, it does not validate loose HTML style markup.", |
41 | 43 | element: 'html', |
42 | 44 | keyword: 'PUBLIC', |
43 | 45 | publicIdentifier: '-//W3C//DTD XHTML 1.0 Strict//EN', |
44 | 46 | systemIdentifier: 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd', |
45 | 47 | }, |
46 | | - 'xhtml-1.0-transitional': { |
| 48 | + { |
| 49 | + name: 'XHTML 1.0 Transitional', |
47 | 50 | description: |
48 | 51 | 'A transitional doctype declaration which validates against the HTML 4.01 spec. It allows some presentational markup and deprecated elements (such as <font> elements) but not framesets. Unlike the `HTML 4.01 Transitional` doctype, it does not validate loose HTML style markup.', |
49 | 52 | element: 'html', |
50 | 53 | keyword: 'PUBLIC', |
51 | 54 | publicIdentifier: '-//W3C//DTD XHTML 1.0 Transitional//EN', |
52 | 55 | systemIdentifier: 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd', |
53 | 56 | }, |
54 | | -}); |
55 | | - |
56 | | -export default doctypes; |
| 57 | +]; |
0 commit comments