39c8b14f |
1 | (function () { |
2 | |
3 | function RunningInNode () { |
4 | return( |
5 | (typeof require) == "function" |
6 | && |
7 | (typeof exports) == "object" |
8 | && |
9 | (typeof module) == "object" |
10 | && |
11 | (typeof __filename) == "string" |
12 | && |
13 | (typeof __dirname) == "string" |
14 | ); |
15 | } |
16 | |
17 | if (!RunningInNode()) { |
18 | if (!this.Tautologistics) |
19 | this.Tautologistics = {}; |
20 | if (!this.Tautologistics.NodeHtmlParser) |
21 | this.Tautologistics.NodeHtmlParser = {}; |
22 | if (!this.Tautologistics.NodeHtmlParser.Tests) |
23 | this.Tautologistics.NodeHtmlParser.Tests = []; |
24 | exports = {}; |
25 | this.Tautologistics.NodeHtmlParser.Tests.push(exports); |
26 | } |
27 | |
28 | exports.name = "Extra spaces in tag"; |
29 | exports.html = "<\n font \n size='14' \n>the text<\n / \nfont \n>"; |
30 | exports.expected = |
31 | [ { raw: '\n font \n size=\'14\' \n' |
32 | , data: 'font \n size=\'14\'' |
33 | , type: 'tag' |
34 | , name: 'font' |
35 | , attribs: { size: '14' } |
36 | , children: |
37 | [ { raw: 'the text' |
38 | , data: 'the text' |
39 | , type: 'text' |
40 | } |
41 | ] |
42 | } |
43 | ]; |
44 | |
45 | })(); |