mediacloth 0.0.3 → 0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (115) hide show
  1. data/README.md +36 -0
  2. data/lib/mediacloth/mediawikiast.rb +58 -1
  3. data/lib/mediacloth/mediawikihtmlgenerator.rb +229 -73
  4. data/lib/mediacloth/mediawikilexer.rb +1030 -656
  5. data/lib/mediacloth/mediawikilinkhandler.rb +89 -0
  6. data/lib/mediacloth/mediawikiparams.rb +1 -10
  7. data/lib/mediacloth/mediawikiparser.rb +939 -409
  8. data/lib/mediacloth/mediawikiparser.tab.rb +1357 -0
  9. data/lib/mediacloth/mediawikiparser.y +256 -52
  10. data/lib/mediacloth/mediawikisignedwikigenerator.rb +42 -0
  11. data/lib/mediacloth/mediawikitemplatehandler.rb +8 -0
  12. data/lib/mediacloth/mediawikiwalker.rb +72 -1
  13. data/lib/mediacloth.rb +33 -10
  14. data/test/data/ast1 +68 -0
  15. data/test/data/ast10 +196 -0
  16. data/test/data/ast11 +34 -0
  17. data/test/data/ast12 +39 -0
  18. data/test/data/ast13 +25 -0
  19. data/test/data/ast14 +13 -0
  20. data/test/data/ast15 +25 -0
  21. data/test/data/ast16 +17 -0
  22. data/test/data/ast17 +9 -0
  23. data/test/data/ast18 +21 -0
  24. data/test/data/ast19 +32 -0
  25. data/test/data/ast2 +4 -0
  26. data/test/data/ast20 +10 -0
  27. data/test/data/ast21 +27 -0
  28. data/test/data/ast22 +22 -0
  29. data/test/data/ast23 +5 -0
  30. data/test/data/ast3 +6 -0
  31. data/test/data/ast4 +122 -0
  32. data/test/data/ast5 +122 -0
  33. data/test/data/ast6 +22 -0
  34. data/test/data/ast7 +143 -0
  35. data/test/data/ast8 +3 -0
  36. data/test/data/ast9 +11 -0
  37. data/test/data/html1 +33 -5
  38. data/test/data/html10 +31 -27
  39. data/test/data/html11 +19 -0
  40. data/test/data/html12 +32 -0
  41. data/test/data/html13 +29 -0
  42. data/test/data/html14 +4 -0
  43. data/test/data/html15 +29 -0
  44. data/test/data/html16 +28 -0
  45. data/test/data/html17 +10 -0
  46. data/test/data/html18 +8 -0
  47. data/test/data/html19 +27 -0
  48. data/test/data/html2 +1 -1
  49. data/test/data/html20 +7 -0
  50. data/test/data/html21 +5 -0
  51. data/test/data/html22 +24 -0
  52. data/test/data/html23 +7 -0
  53. data/test/data/html3 +1 -1
  54. data/test/data/html4 +60 -11
  55. data/test/data/html5 +45 -6
  56. data/test/data/html6 +5 -5
  57. data/test/data/html7 +59 -1
  58. data/test/data/html8 +1 -1
  59. data/test/data/html9 +10 -2
  60. data/test/data/input1 +4 -0
  61. data/test/data/input11 +19 -0
  62. data/test/data/input12 +32 -0
  63. data/test/data/input13 +10 -0
  64. data/test/data/input14 +8 -0
  65. data/test/data/input15 +10 -0
  66. data/test/data/input16 +28 -0
  67. data/test/data/input17 +10 -0
  68. data/test/data/input18 +16 -0
  69. data/test/data/input19 +29 -0
  70. data/test/data/input20 +8 -0
  71. data/test/data/input21 +18 -0
  72. data/test/data/input22 +20 -0
  73. data/test/data/input23 +8 -0
  74. data/test/data/input4 +13 -1
  75. data/test/data/input5 +45 -4
  76. data/test/data/input7 +25 -1
  77. data/test/data/lex1 +17 -18
  78. data/test/data/lex10 +57 -87
  79. data/test/data/lex11 +18 -0
  80. data/test/data/lex12 +32 -0
  81. data/test/data/lex13 +3 -0
  82. data/test/data/lex14 +1 -0
  83. data/test/data/lex15 +3 -0
  84. data/test/data/lex16 +27 -0
  85. data/test/data/lex17 +9 -0
  86. data/test/data/lex18 +4 -0
  87. data/test/data/lex19 +27 -0
  88. data/test/data/lex2 +2 -2
  89. data/test/data/lex20 +7 -0
  90. data/test/data/lex21 +4 -0
  91. data/test/data/lex22 +3 -0
  92. data/test/data/lex23 +7 -0
  93. data/test/data/lex3 +1 -1
  94. data/test/data/lex4 +35 -29
  95. data/test/data/lex5 +57 -18
  96. data/test/data/lex6 +7 -7
  97. data/test/data/lex7 +42 -18
  98. data/test/data/lex8 +1 -1
  99. data/test/data/lex9 +6 -6
  100. data/test/dataproducers/ast.rb +24 -0
  101. data/test/dataproducers/html.rb +11 -12
  102. data/test/dataproducers/lex.rb +9 -4
  103. data/test/debugwalker.rb +25 -11
  104. data/test/htmlgenerator.rb +170 -13
  105. data/test/lexer.rb +626 -83
  106. data/test/linkhandler.rb +39 -0
  107. data/test/parser.rb +176 -9
  108. data/test/signedwikigenerator.rb +113 -0
  109. metadata +158 -79
  110. data/README +0 -37
  111. data/lib/mediacloth/mediawikilexer.rb~ +0 -491
  112. data/lib/mediacloth/mediawikiparser.y~ +0 -210
  113. data/test/data/result1 +0 -48
  114. data/test/dataproducers/html.rb~ +0 -24
  115. data/test/dataproducers/lex.rb~ +0 -15
data/test/data/input22 ADDED
@@ -0,0 +1,20 @@
1
+ __TOC__
2
+
3
+ <div>
4
+ = Headline1 =
5
+ <span>
6
+ == Sub Headline 1a ==
7
+ </span>
8
+ == Sub Headline 1b ==
9
+ </div>
10
+ = Headline2 =
11
+ <table>
12
+ <tr>
13
+ <td>
14
+ == Sub Headline 2a ==
15
+ </td>
16
+ <td>
17
+ == Sub Headline 2b ==
18
+ </td>
19
+ </tr>
20
+ </table>
data/test/data/input23 ADDED
@@ -0,0 +1,8 @@
1
+ <pre>
2
+ This is
3
+ preformatted text
4
+
5
+ </pre>
6
+
7
+ And this is
8
+ preformatted text
data/test/data/input4 CHANGED
@@ -31,12 +31,15 @@ Text
31
31
 
32
32
  ''Some italic and now '''bold
33
33
  ==Heading==
34
+
34
35
  Text
35
36
 
36
37
 
37
38
  ''Some italic and now '''bold
38
39
 
39
40
  ==Heading==
41
+
42
+
40
43
  Text
41
44
 
42
45
 
@@ -47,4 +50,13 @@ Text
47
50
 
48
51
  ''Some italic and now '''bold
49
52
 
50
- Text
53
+ Text
54
+
55
+ Invalid and weird sections:
56
+ ================
57
+ =
58
+ ==
59
+ ===
60
+ ====
61
+ =====
62
+ ======
data/test/data/input5 CHANGED
@@ -1,3 +1,5 @@
1
+ Unordered lists
2
+
1
3
  *A
2
4
  **A
3
5
  ***a
@@ -6,6 +8,12 @@
6
8
  *B
7
9
  **b
8
10
 
11
+ *A
12
+ *B
13
+ *
14
+
15
+ Ordered lists
16
+
9
17
  #a
10
18
  ##a
11
19
  ###a
@@ -13,10 +21,43 @@
13
21
  #a
14
22
  ##aa
15
23
 
16
- *A
17
- *B
18
- *
19
-
20
24
  #A
21
25
  #B
22
26
  #
27
+
28
+ Mixed lists
29
+
30
+ *a
31
+ *#1
32
+ *#2
33
+ *b
34
+
35
+ #a
36
+ #*1
37
+ #*2
38
+ #**2
39
+ #b
40
+
41
+ Dictionary lists
42
+
43
+ ;d
44
+
45
+
46
+ :t
47
+
48
+
49
+ ;d
50
+ :t
51
+
52
+
53
+ ;d
54
+ :t
55
+ :t
56
+
57
+
58
+ ;d
59
+ :t
60
+ ;d
61
+ :t
62
+
63
+ ;d :t [[image:foo.jpg]]
data/test/data/input7 CHANGED
@@ -1,5 +1,7 @@
1
1
  http://sun.com
2
2
 
3
+ http://sun.com:80
4
+
3
5
  [http://sun.com]
4
6
 
5
7
  [mailto:joe@sun.com]
@@ -10,6 +12,10 @@ http://sun.com
10
12
 
11
13
  [http://sun.com stars and ''moon'' and '''trees''' and birds]
12
14
 
15
+ [http://sun.com <tt>sun</tt> and <tt>moon</tt>]
16
+
17
+ [http://sun.com sun > moon]
18
+
13
19
  [[sun]]
14
20
 
15
21
  [[sun|All about Sun]]
@@ -18,6 +24,10 @@ http://sun.com
18
24
 
19
25
  [[sun|nofollow|All about Sun]]
20
26
 
27
+ [[sun|nofollow|Sun > Moon]]
28
+
29
+ [[sun|nofollow|<tt>sun</tt> and <tt>moon</tt>]]
30
+
21
31
  [[image:sun|nofollow|All about Sun]]
22
32
 
23
33
  [[image:sun|All about [[Sun]]]]
@@ -26,10 +36,24 @@ http://sun.com
26
36
 
27
37
  [[image:sun|one||two||three|]]
28
38
 
39
+ [[image:sun|one|[[aaa|bbb|ccc]]|[[image:moon|aaa|bbb|ccc]]|two]]
40
+
29
41
  []
30
42
 
31
43
  [ ]
32
44
 
33
45
  [[]]
34
46
 
35
- [[ ]]
47
+ [[ ]]
48
+
49
+ [[Category:Category]]
50
+
51
+ [[Category:Category name]]
52
+
53
+ [[Category:Category name|Sort as]]
54
+
55
+ [[:Category:Category]]
56
+
57
+ [[:Category:Category name]]
58
+
59
+ [[:Category:Category name|Foo]]
data/test/data/lex1 CHANGED
@@ -1,26 +1,25 @@
1
- PARA_STARTTEXTThis is a simple text with BOLDSTART'''TEXTBold textBOLDEND'''TEXT and ITALICSTART''TEXTItalic textITALICEND''TEXT inside.
2
- One paragraph can be written in several lines.PARA_END
1
+ PARA_START[0, 0]TEXTThis is a simple text with [0, 27]BOLD_START'''[27, 3]TEXTBold text[30, 9]BOLD_END'''[39, 3]TEXT and [42, 5]ITALIC_START''[47, 2]TEXTItalic text[49, 11]ITALIC_END''[60, 2]TEXT inside.
2
+ One paragraph can be written in several lines.
3
3
 
4
- PARA_STARTTEXTAnother paragraph starts after a blank line.PARA_END
4
+ [62, 57]PARA_END[119, 0]PARA_START[119, 0]TEXTAnother paragraph starts after a blank line.
5
5
 
6
- PARA_STARTTEXT
7
- Another one.PARA_END
6
+ [119, 46]PARA_END[165, 0]PARA_START[165, 0]TEXT
7
+ Another one.
8
8
 
9
- PARA_STARTTEXTThis is text with INTLINKSTART[[TEXTInternal LinkINTLINKEND]]TEXT and LINKSTART[TEXThttp://www.example.comLINKSEPTEXTexternal linkLINKEND]TEXT.PARA_END
9
+ [165, 15]PARA_END[180, 0]PARA_START[180, 0]TEXTThis is text with [180, 18]INTLINK_START[[[198, 2]TEXTInternal Link[200, 13]INTLINK_END]][213, 2]TEXT and [215, 5]LINK_START[[220, 1]TEXThttp://www.example.com[221, 22]LINKSEP [243, 1]TEXTexternal link[244, 13]LINK_END][257, 1]TEXT.
10
10
 
11
- PARA_STARTTEXTWe can have headlines:PARA_END
11
+ [258, 3]PARA_END[261, 0]PARA_START[261, 0]LINK_START[261, 0]TEXThttp://inline.link/with?at@character[261, 36]LINK_END[297, 0]TEXT
12
12
 
13
- SECTION_START=TEXT Headline1 SECTION_END=SECTION_START==TEXT Headline2 SECTION_END==SECTION_START===TEXT Headline3 SECTION_END===SECTION_START====TEXT Headline4 SECTION_END====SECTION_START=====TEXT Headline5 SECTION_END=====SECTION_START======TEXT Headline6 SECTION_END======SECTION_START=======TEXT Headline7 SECTION_END=======PARA_STARTPARA_END
13
+ [297, 2]PARA_END[299, 0]PARA_START[299, 0]TEXTWe can have headlines:
14
14
 
15
- PARA_STARTTEXTHeadlines may have formatting:PARA_END
15
+ [299, 24]PARA_END[323, 1]SECTION_START=[324, 1]TEXT Headline1 [325, 11]SECTION_END=[336, 2]SECTION_START==[338, 2]TEXT Headline2 [340, 11]SECTION_END==[351, 3]SECTION_START===[354, 3]TEXT Headline3 [357, 11]SECTION_END===[368, 4]SECTION_START====[372, 4]TEXT Headline4 [376, 11]SECTION_END====[387, 5]SECTION_START=====[392, 5]TEXT Headline5 [397, 11]SECTION_END=====[408, 6]SECTION_START======[414, 6]TEXT Headline6 [420, 11]SECTION_END======[431, 7]SECTION_START=======[438, 7]TEXT Headline7 [445, 11]SECTION_END=======[456, 0]PARA_START[456, 8]TEXT
16
+ Headlines may have formatting:
16
17
 
17
- SECTION_START=TEXT See INTLINKSTART[[TEXTInternal LinkINTLINKEND]]TEXT for more info SECTION_END=SECTION_START==TEXT This is an BOLDSTART'''TEXTimportantBOLDEND'''TEXT heading SECTION_END==PARA_STARTPARA_END
18
+ [464, 33]PARA_END[497, 0]SECTION_START=[497, 1]TEXT See [498, 5]INTLINK_START[[[503, 2]TEXTInternal Link[505, 13]INTLINK_END]][518, 2]TEXT for more info [520, 15]SECTION_END=[535, 2]SECTION_START==[537, 2]TEXT This is an [539, 12]BOLD_START'''[551, 3]TEXTimportant[554, 9]BOLD_END'''[563, 3]TEXT heading [566, 9]SECTION_END==[575, 4]PREINDENT_START[579, 0]TEXT This is a preformatted [579, 24]BOLD_START'''[603, 3]TEXT [606, 1]BOLD_END'''[607, 3]TEXT << [610, 4]ITALIC_START''[614, 2]TEXT [616, 1]ITALIC_END''[617, 2]TEXT text
19
+ yes
20
+ [619, 11]PREINDENT_END[630, 1]HLINE----[631, 4]PARA_START[635, 0]TEXT
21
+ This is a text after the line.
18
22
 
19
- PREThis is a preformatted ''' ''' << '' '' text
20
- PREyes
21
- HLINE----PARA_STARTTEXT
22
- This is a text after the line.PARA_END
23
-
24
- UL_STARTLI_STARTTEXTfoo
25
- LI_ENDLI_STARTTEXTfoo2
26
- LI_ENDUL_ENDfalsefalse
23
+ [635, 33]PARA_END[668, 0]UL_START[668, 0]LI_START[668, 1]TEXTfoo
24
+ [669, 4]LI_END[673, 0]LI_START[673, 1]TEXT foo2
25
+ [674, 6]LI_END[680, 0]UL_END[680, 1]SECTION_START==[681, 2]TEXT There aren't any closing quotes inside this headline's name [683, 61]SECTION_END==[744, 2]falsefalse[746, 0]
data/test/data/lex10 CHANGED
@@ -1,87 +1,57 @@
1
- PARA_STARTTEXTSome examples of tables.PARA_END
2
-
3
- TABLE_START{|TABLE_END|}PARA_STARTPARA_END
4
-
5
- TABLE_START{|ROW_START|-ROW_END|}TABLE_ENDPARA_STARTPARA_END
6
-
7
- TABLE_START{|ROW_START|CELL_STARTTEXT a
8
- CELL_END|CELL_STARTTEXT b
9
- CELL_END|}ROW_ENDTABLE_ENDPARA_STARTPARA_END
10
-
11
- TABLE_START{|ROW_START|CELL_STARTTEXT a
12
- CELL_END|CELL_STARTTEXT b
13
- CELL_END|-ROW_ENDROW_STARTCELL_START|TEXT 1
14
- CELL_END|CELL_STARTTEXT 2
15
- CELL_END|}ROW_ENDTABLE_ENDPARA_STARTPARA_END
16
-
17
- TABLE_START{|ROW_START|CELL_STARTTEXT a CELL_END||CELL_STARTTEXT b
18
- CELL_END|-ROW_ENDROW_STARTCELL_START|TEXT 1 CELL_END||CELL_STARTTEXT 2
19
- CELL_END|}ROW_ENDTABLE_ENDPARA_STARTPARA_END
20
-
21
- TABLE_START{|ROW_START!HEAD_STARTTEXT a
22
- HEAD_END!HEAD_STARTTEXT b
23
- HEAD_END|-ROW_ENDROW_STARTCELL_START|TEXT 1
24
- CELL_END|CELL_STARTTEXT 2
25
- CELL_END|}ROW_ENDTABLE_ENDPARA_STARTPARA_END
26
-
27
- TABLE_START{|ROW_START!HEAD_STARTTEXT a HEAD_END||HEAD_STARTTEXT b
28
- HEAD_END|-ROW_ENDROW_STARTCELL_START|TEXT 1 CELL_END||CELL_STARTTEXT 2
29
- CELL_END|}ROW_ENDTABLE_ENDPARA_STARTPARA_END
30
-
31
- TABLE_START{|ROW_START|CELL_STARTTEXT a
32
- CELL_END|-ROW_ENDROW_STARTCELL_START|TEXT 1
33
- CELL_END|CELL_STARTTEXT 2
34
- CELL_END|}ROW_ENDTABLE_ENDPARA_STARTPARA_END
35
-
36
- TABLE_START{|ROW_START|CELL_STARTTEXT a
37
- CELL_END|CELL_STARTTEXT b
38
- CELL_END|-ROW_ENDROW_STARTCELL_START|TEXT 1
39
- CELL_END|}ROW_ENDTABLE_ENDPARA_STARTPARA_END
40
-
41
- TABLE_START{|ROW_START|CELL_STARTTEXT a
42
- CELL_END|CELL_STARTTEXT b
43
- CELL_END|-ROW_ENDROW_STARTCELL_START|CELL_END|CELL_STARTTEXT 2
44
- CELL_END|}ROW_ENDTABLE_ENDPARA_STARTPARA_END
45
-
46
- TABLE_START{|ROW_START|CELL_STARTTEXT LINKSTART[TEXThttp://example.comLINKSEPTEXTExampleLINKEND]CELL_END|CELL_STARTTEXT BOLDSTART'''TEXTboldBOLDEND'''CELL_END|-ROW_ENDROW_STARTCELL_START|TEXT INTLINKSTART[[TEXTexampleINTLINKSEP|TEXTExampleINTLINKEND]]CELL_END|CELL_STARTTEXT INTLINKSTART[[TEXTimageRESOURCE_SEP:TEXTexample.jpgINTLINKSEP|TEXT1INTLINKSEP|TEXT2INTLINKSEP|TEXT3INTLINKEND]]CELL_END|}ROW_ENDTABLE_ENDPARA_STARTPARA_END
47
-
48
- TABLE_START{|ROW_START|CELL_STARTTEXT LINKSTART[TEXThttp://example.comLINKSEPTEXTExample
49
- LINKEND|CELL_ENDCELL_STARTTEXT BOLDSTART'''TEXTbold
50
- BOLDEND|-CELL_ENDROW_ENDROW_STARTCELL_START|TEXT INTLINKSTART[[TEXTexampleINTLINKSEP|TEXTExample
51
- INTLINKEND|CELL_ENDCELL_STARTTEXT BOLDSTART'''TEXTbold ITALICSTART''TEXTitalic
52
- ITALICEND|}BOLDENDCELL_ENDROW_ENDTABLE_ENDPARA_STARTPARA_END
53
-
54
- TABLE_START{|ROW_START|CELL_STARTTEXT a
55
- CELL_END|CELL_STARTTEXT b
56
- CELL_END|-ROW_ENDROW_STARTCELL_START|TEXT A list in a cell:
57
- UL_STARTLI_STARTTEXTone
58
- LI_ENDLI_STARTTEXTtwo
59
- LI_ENDUL_ENDCELL_END|}ROW_ENDTABLE_ENDPARA_STARTPARA_END
60
-
61
- TABLE_START{|ROW_START|CELL_STARTTEXT a
62
- CELL_END|CELL_STARTTEXT b
63
- CELL_END|-ROW_ENDROW_STARTCELL_START|TEXT A table in a cell:
64
- TABLE_START{|ROW_START|CELL_STARTTEXT 1
65
- CELL_END|CELL_STARTTEXT 2
66
- CELL_END|-ROW_ENDROW_STARTCELL_START|TEXT one
67
- CELL_END|CELL_STARTTEXT two
68
- CELL_END|}ROW_ENDTABLE_ENDCELL_END|}ROW_ENDTABLE_ENDPARA_STARTPARA_END
69
-
70
- TABLE_START{|TEXT border="1"
71
- ROW_START!HEAD_STARTTEXT a
72
- HEAD_END!HEAD_STARTTEXT b
73
- HEAD_END|-ROW_ENDROW_STARTTEXT align="left"
74
- CELL_START|TEXT 1
75
- CELL_END|CELL_STARTTEXT 2
76
- CELL_END|}ROW_ENDTABLE_ENDPARA_STARTPARA_END
77
-
78
- PARA_STARTTEXT
79
- Text before
80
- PARA_END{|TABLE_STARTROW_START|CELL_STARTTEXT a
81
- CELL_END|CELL_STARTTEXT b
82
- CELL_END|}ROW_ENDTABLE_ENDPARA_STARTPARA_END
83
-
84
- PARA_STARTTEXTText before with ITALICSTART''TEXTitalic
85
- ITALICEND{|PARA_ENDTABLE_STARTROW_START|CELL_STARTTEXT a
86
- CELL_END|CELL_STARTTEXT b
87
- CELL_END|}ROW_ENDTABLE_ENDfalsefalse
1
+ PARA_START[0, 0]TEXTSome examples of tables.
2
+
3
+ [0, 26]PARA_END[26, 0]TABLE_START{|[26, 3]TABLE_END|}[29, 4]TABLE_START{|[33, 3]ROW_START|-[36, 3]ROW_END[39, 0]TABLE_END|}[39, 4]TABLE_START{|[43, 3]ROW_START[46, 0]CELL_START|[46, 1]TEXT a
4
+ [47, 3]CELL_END[50, 0]CELL_START|[50, 1]TEXT b
5
+ [51, 3]CELL_END[54, 0]ROW_END[54, 0]TABLE_END|}[54, 4]TABLE_START{|[58, 3]ROW_START[61, 0]CELL_START|[61, 1]TEXT a
6
+ [62, 3]CELL_END[65, 0]CELL_START|[65, 1]TEXT b
7
+ [66, 3]CELL_END[69, 0]ROW_END[69, 0]ROW_START|-[69, 3]CELL_START|[72, 1]TEXT 1
8
+ [73, 3]CELL_END[76, 0]CELL_START|[76, 1]TEXT 2
9
+ [77, 3]CELL_END[80, 0]ROW_END[80, 0]TABLE_END|}[80, 4]TABLE_START{|[84, 3]ROW_START[87, 0]CELL_START|[87, 1]TEXT a [88, 3]CELL_END[91, 0]CELL_START||[91, 2]TEXT b
10
+ [93, 3]CELL_END[96, 0]ROW_END[96, 0]ROW_START|-[96, 3]CELL_START|[99, 1]TEXT 1 [100, 3]CELL_END[103, 0]CELL_START||[103, 2]TEXT 2
11
+ [105, 3]CELL_END[108, 0]ROW_END[108, 0]TABLE_END|}[108, 4]TABLE_START{|[112, 3]ROW_START[115, 0]HEAD_START![115, 1]TEXT a
12
+ [116, 3]HEAD_END[119, 0]HEAD_START![119, 1]TEXT b
13
+ [120, 3]HEAD_END[123, 0]ROW_END[123, 0]ROW_START|-[123, 3]CELL_START|[126, 1]TEXT 1
14
+ [127, 3]CELL_END[130, 0]CELL_START|[130, 1]TEXT 2
15
+ [131, 3]CELL_END[134, 0]ROW_END[134, 0]TABLE_END|}[134, 4]TABLE_START{|[138, 3]ROW_START[141, 0]HEAD_START![141, 1]TEXT a [142, 3]HEAD_END[145, 0]HEAD_START||[145, 2]TEXT b
16
+ [147, 3]HEAD_END[150, 0]ROW_END[150, 0]ROW_START|-[150, 3]CELL_START|[153, 1]TEXT 1 [154, 3]CELL_END[157, 0]CELL_START||[157, 2]TEXT 2
17
+ [159, 3]CELL_END[162, 0]ROW_END[162, 0]TABLE_END|}[162, 4]TABLE_START{|[166, 3]ROW_START[169, 0]CELL_START|[169, 1]TEXT a
18
+ [170, 3]CELL_END[173, 0]ROW_END[173, 0]ROW_START|-[173, 3]CELL_START|[176, 1]TEXT 1
19
+ [177, 3]CELL_END[180, 0]CELL_START|[180, 1]TEXT 2
20
+ [181, 3]CELL_END[184, 0]ROW_END[184, 0]TABLE_END|}[184, 4]TABLE_START{|[188, 3]ROW_START[191, 0]CELL_START|[191, 1]TEXT a
21
+ [192, 3]CELL_END[195, 0]CELL_START|[195, 1]TEXT b
22
+ [196, 3]CELL_END[199, 0]ROW_END[199, 0]ROW_START|-[199, 3]CELL_START|[202, 1]TEXT 1
23
+ [203, 3]CELL_END[206, 0]ROW_END[206, 0]TABLE_END|}[206, 4]TABLE_START{|[210, 3]ROW_START[213, 0]CELL_START|[213, 1]TEXT a
24
+ [214, 3]CELL_END[217, 0]CELL_START|[217, 1]TEXT b
25
+ [218, 3]CELL_END[221, 0]ROW_END[221, 0]ROW_START|-[221, 3]CELL_START|[224, 2]CELL_END[226, 0]CELL_START|[226, 1]TEXT 2
26
+ [227, 3]CELL_END[230, 0]ROW_END[230, 0]TABLE_END|}[230, 4]TABLE_START{|[234, 3]ROW_START[237, 0]CELL_START|[237, 1]TEXT [238, 1]LINK_START[[239, 1]TEXThttp://example.com[240, 18]LINKSEP [258, 1]TEXTExample[259, 7]LINK_END][266, 2]CELL_END[268, 0]CELL_START|[268, 1]TEXT [269, 1]BOLD_START'''[270, 3]TEXTbold[273, 4]BOLD_END'''[277, 4]CELL_END[281, 0]ROW_END[281, 0]ROW_START|-[281, 3]CELL_START|[284, 1]TEXT [285, 1]INTLINK_START[[[286, 2]TEXTexample[288, 7]INTLINKSEP|[295, 1]TEXTExample[296, 7]INTLINK_END]][303, 3]CELL_END[306, 0]CELL_START|[306, 1]TEXT [307, 1]INTLINK_START[[[308, 2]TEXTimage[310, 5]RESOURCESEP:[315, 1]TEXTexample.jpg[316, 11]INTLINKSEP|[327, 1]TEXT1[328, 1]INTLINKSEP|[329, 1]TEXT2[330, 1]INTLINKSEP|[331, 1]TEXT3[332, 1]INTLINK_END]][333, 3]CELL_END[336, 0]ROW_END[336, 0]TABLE_END|}[336, 4]TABLE_START{|[340, 3]ROW_START[343, 0]CELL_START|[343, 1]TEXT [344, 1]LINK_START[[345, 1]TEXThttp://example.com[346, 18]LINKSEP [364, 1]TEXTExample[365, 7]LINK_END[372, 1]CELL_END[373, 0]CELL_START|[373, 1]TEXT [374, 1]BOLD_START'''[375, 3]TEXTbold
27
+ [378, 5]BOLD_END[383, 0]CELL_END[383, 0]ROW_END[383, 0]ROW_START|-[383, 3]CELL_START|[386, 1]TEXT [387, 1]INTLINK_START[[[388, 2]TEXTexample[390, 7]INTLINKSEP|[397, 1]TEXTExample[398, 7]INTLINK_END[405, 1]CELL_END[406, 0]CELL_START|[406, 1]TEXT [407, 1]BOLD_START'''[408, 3]TEXTbold [411, 5]ITALIC_START''[416, 2]TEXTitalic
28
+ [418, 7]ITALIC_END[425, 0]BOLD_END[425, 0]CELL_END[425, 0]ROW_END[425, 0]TABLE_END|}[425, 4]TABLE_START{|[429, 3]ROW_START[432, 0]CELL_START|[432, 1]TEXT a
29
+ [433, 3]CELL_END[436, 0]CELL_START|[436, 1]TEXT b
30
+ [437, 3]CELL_END[440, 0]ROW_END[440, 0]ROW_START|-[440, 3]CELL_START|[443, 1]TEXT A list in a cell:
31
+ [444, 19]UL_START[463, 0]LI_START[463, 1]TEXT one
32
+ [464, 5]LI_END[469, 0]LI_START[469, 1]TEXT two
33
+ [470, 5]LI_END[475, 0]UL_END[475, 0]CELL_END[475, 0]ROW_END[475, 0]TABLE_END|}[475, 4]TABLE_START{|[479, 3]ROW_START[482, 0]CELL_START|[482, 1]TEXT a
34
+ [483, 3]CELL_END[486, 0]CELL_START|[486, 1]TEXT b
35
+ [487, 3]CELL_END[490, 0]ROW_END[490, 0]ROW_START|-[490, 3]CELL_START|[493, 1]TEXT A table in a cell:
36
+ [494, 20]TABLE_START{|[514, 3]ROW_START[517, 0]CELL_START|[517, 1]TEXT 1
37
+ [518, 3]CELL_END[521, 0]CELL_START|[521, 1]TEXT 2
38
+ [522, 3]CELL_END[525, 0]ROW_END[525, 0]ROW_START|-[525, 3]CELL_START|[528, 1]TEXT one
39
+ [529, 5]CELL_END[534, 0]CELL_START|[534, 1]TEXT two
40
+ [535, 5]CELL_END[540, 0]ROW_END[540, 0]TABLE_END|}[540, 3]CELL_END[543, 0]ROW_END[543, 0]TABLE_END|}[543, 0]PARA_START[543, 3]TEXT
41
+
42
+ [546, 2]PARA_END[548, 0]TABLE_START{|[548, 2]TEXT border="1"
43
+ [550, 12]ROW_START[562, 0]HEAD_START![562, 1]TEXT a
44
+ [563, 3]HEAD_END[566, 0]HEAD_START![566, 1]TEXT b
45
+ [567, 3]HEAD_END[570, 0]ROW_END[570, 0]ROW_START|-[570, 2]TEXT align="left"
46
+ [572, 14]CELL_START|[586, 1]TEXT 1
47
+ [587, 3]CELL_END[590, 0]CELL_START|[590, 1]TEXT 2
48
+ [591, 3]CELL_END[594, 0]ROW_END[594, 0]TABLE_END|}[594, 0]PARA_START[594, 3]TEXT
49
+
50
+ [597, 2]PARA_END[599, 0]PARA_START[599, 0]TEXTText before
51
+ [599, 12]PARA_END[611, 0]TABLE_START{|[611, 3]ROW_START[614, 0]CELL_START|[614, 1]TEXT a
52
+ [615, 3]CELL_END[618, 0]CELL_START|[618, 1]TEXT b
53
+ [619, 3]CELL_END[622, 0]ROW_END[622, 0]TABLE_END|}[622, 0]PARA_START[622, 3]TEXT
54
+ Text before with [625, 18]ITALIC_START''[643, 2]TEXTitalic
55
+ [645, 7]ITALIC_END[652, 0]PARA_END[652, 0]TABLE_START{|[652, 3]ROW_START[655, 0]CELL_START|[655, 1]TEXT a
56
+ [656, 3]CELL_END[659, 0]CELL_START|[659, 1]TEXT b
57
+ [660, 3]CELL_END[663, 0]ROW_END[663, 0]TABLE_END|}[663, 2]falsefalse[665, 0]
data/test/data/lex11 ADDED
@@ -0,0 +1,18 @@
1
+ SECTION_START==[0, 2]TEXTExamples of XHTML markup and escaping of XML characters[2, 55]SECTION_END==[57, 0]PARA_START[57, 3]TEXT
2
+ Here is a [60, 11]TAG_STARTtt[71, 4]TEXTcode sample[75, 11]TAG_ENDtt[86, 5]TEXT.
3
+
4
+ [91, 3]PARA_END[94, 0]PARA_START[94, 0]TEXTAnother [94, 8]TAG_STARTtt[102, 0]ATTR_NAMEclass[102, 0]ATTR_VALUEcode[102, 17]TEXTcode sample[119, 11]TAG_ENDtt[130, 5]TEXT.
5
+ Another [135, 10]TAG_STARTtt[145, 0]ATTR_NAMEclass[145, 0]ATTR_VALUEcode[145, 17]TEXTcode sample[162, 11]TAG_ENDtt[173, 5]TEXT.
6
+ Another [178, 10]TAG_STARTtt[188, 0]ATTR_NAMEclass[188, 0]ATTR_VALUEcode[188, 15]TEXTcode sample[203, 11]TAG_ENDtt[214, 5]TEXT.
7
+
8
+ [219, 3]PARA_END[222, 0]PARA_START[222, 0]TEXTAn example of a <tt>code sample</tt>.
9
+
10
+ [222, 39]PARA_END[278, 0]PARA_START[278, 0]TEXTSome math:
11
+
12
+ [278, 12]PARA_END[290, 0]PREINDENT_START[290, 0]TEXT 1 < 2 & 1 > 0
13
+ [290, 16]PREINDENT_END[306, 0]PARA_START[306, 0]TEXT
14
+ And more text.
15
+
16
+ [306, 17]PARA_END[323, 0]UL_START[323, 0]LI_START[323, 1]TEXT one
17
+ [324, 5]LI_END[329, 0]LI_START[329, 1]TEXT two [330, 5]TAG_STARTspan[335, 6]TEXTa b
18
+ c d e f[341, 11]TAG_ENDspan[352, 7]LI_END[359, 0]UL_END[359, 0]falsefalse[359, 0]
data/test/data/lex12 ADDED
@@ -0,0 +1,32 @@
1
+ PARA_START[0, 0]TEXTone [0, 4]CHAR_ENTamp[4, 5]TEXT two
2
+ 1 [9, 7]CHAR_ENTlt[16, 4]TEXT 2
3
+ [20, 3]CHAR_ENTlt[23, 4]TEXTlt; is the "lt" symbol
4
+ 1 < 2 & 3 > 2
5
+
6
+ [27, 38]PARA_END[65, 0]PARA_START[65, 0]TEXTthis [65, 5]CHAR_ENTlt[70, 4]CHAR_ENTgt[74, 4]TEXT that
7
+
8
+ [78, 7]PARA_END[85, 0]PARA_START[85, 0]TEMPLATE_START{{[85, 2]TEXTref[87, 3]TEMPLATE_END}}[90, 2]TEXT
9
+
10
+ [92, 2]PARA_END[94, 0]PARA_START[94, 0]TEXT{{}}
11
+
12
+ [94, 6]PARA_END[100, 0]PARA_START[100, 0]TEMPLATE_START{{[100, 2]TEXT [102, 1]TEMPLATE_END}}[103, 2]TEXT
13
+
14
+ [105, 2]PARA_END[107, 0]PARA_START[107, 0]TEMPLATE_START{{[107, 2]TEXTref[109, 3]INTLINKSEP|[112, 1]TEXTattr1[113, 5]TEMPLATE_END}}[118, 2]TEXT
15
+
16
+ [120, 2]PARA_END[122, 0]PARA_START[122, 0]TEMPLATE_START{{[122, 2]TEXTref[124, 3]INTLINKSEP|[127, 1]TEXTattr1[128, 5]INTLINKSEP|[133, 1]TEXTattr2[134, 5]INTLINKSEP|[139, 1]TEXTattr3[140, 5]TEMPLATE_END}}[145, 2]TEXT
17
+
18
+ [147, 2]PARA_END[149, 0]PARA_START[149, 0]TEMPLATE_START{{[149, 2]TEXTref with spaces[151, 15]INTLINKSEP|[166, 1]TEXTattr1 with spaces[167, 17]TEMPLATE_END}}[184, 2]TEXT
19
+
20
+ [186, 2]PARA_END[188, 0]PARA_START[188, 0]TEMPLATE_START{{[188, 2]TEXTNS:ref[190, 6]TEMPLATE_END}}[196, 2]TEXT
21
+
22
+ [198, 2]PARA_END[200, 0]PARA_START[200, 0]TEMPLATE_START{{[200, 2]TEXTNS:ref[202, 6]INTLINKSEP|[208, 1]TEXTattr[209, 4]TEMPLATE_END}}[213, 2]TEXT
23
+
24
+ [215, 2]PARA_END[217, 0]PARA_START[217, 0]TEMPLATE_START{{[217, 2]TEXTNS: ref[219, 7]TEMPLATE_END}}[226, 2]TEXT
25
+
26
+ [228, 2]PARA_END[230, 0]PARA_START[230, 0]TEMPLATE_START{{[230, 2]TEXTNS: ref[232, 7]INTLINKSEP|[239, 1]TEXTattr[240, 4]TEMPLATE_END}}[244, 2]TEXT
27
+
28
+ [246, 2]PARA_END[248, 0]PARA_START[248, 0]TEMPLATE_START{{[248, 2]TEXTref[250, 3]INTLINKSEP|[253, 1]TEMPLATE_START{{[254, 2]TEXTinner[256, 5]TEMPLATE_END}}[261, 2]TEMPLATE_END}}[263, 2]TEXT
29
+
30
+ [265, 2]PARA_END[267, 0]PARA_START[267, 0]TEMPLATE_START{{[267, 2]TEXTref[269, 3]INTLINKSEP|[272, 1]TEMPLATE_START{{[273, 2]TEXTinner[275, 5]TEMPLATE_END}}[280, 2]INTLINKSEP|[282, 1]TEMPLATE_START{{[283, 2]TEXTinner2[285, 6]TEMPLATE_END}}[291, 2]TEMPLATE_END}}[293, 2]TEXT
31
+
32
+ [295, 2]PARA_END[297, 0]PARA_START[297, 0]TEMPLATE_START{{[297, 2]TEXTref[299, 3]INTLINKSEP|[302, 1]TEMPLATE_START{{[303, 2]TEXTinner[305, 5]INTLINKSEP|[310, 1]TEMPLATE_START{{[311, 2]TEXTsubinner[313, 8]TEMPLATE_END}}[321, 2]TEMPLATE_END}}[323, 2]TEMPLATE_END}}[325, 2]PARA_END[327, 0]falsefalse[327, 0]
data/test/data/lex13 ADDED
@@ -0,0 +1,3 @@
1
+ KEYWORDTOC[0, 7]PARA_START[7, 0]TEXT
2
+
3
+ [7, 2]PARA_END[9, 0]SECTION_START=[9, 1]TEXT Headline1 [10, 11]SECTION_END=[21, 2]SECTION_START==[23, 2]TEXT Sub Headline 1a [25, 17]SECTION_END==[42, 3]SECTION_START==[45, 2]TEXT Sub Headline 1b [47, 17]SECTION_END==[64, 3]SECTION_START=[67, 1]TEXT Headline2 [68, 11]SECTION_END=[79, 2]SECTION_START==[81, 2]TEXT Sub Headline 2a [83, 17]SECTION_END==[100, 3]SECTION_START===[103, 3]TEXT Sub Sub Headline [106, 18]TAG_STARTi[124, 3]TEXT2i[127, 2]TAG_ENDi[129, 4]TEXT [133, 1]SECTION_END===[134, 4]SECTION_START===[138, 3]TEXT Sub Sub Headline [141, 18]BOLD_START'''[159, 3]TEXT2ii[162, 3]BOLD_END'''[165, 3]TEXT [168, 1]SECTION_END===[169, 4]SECTION_START==[173, 2]TEXT Sub Headline 2b [175, 17]SECTION_END==[192, 2]falsefalse[194, 0]
data/test/data/lex14 ADDED
@@ -0,0 +1 @@
1
+ SECTION_START=[0, 1]TEXT Headline1 [1, 11]SECTION_END=[12, 2]TAG_STARTpre[14, 5]TEXTSomething[19, 9]TAG_ENDpre[28, 8]SECTION_START==[36, 2]TEXT Headline2 [38, 11]SECTION_END==[49, 3]TAG_STARTpre[52, 5]TEXTSomething[57, 9]TAG_ENDpre[66, 8]SECTION_START==[74, 2]TEXT Headline3 [76, 11]SECTION_END==[87, 3]TAG_STARTpre[90, 5]TEXTSomething[95, 9]TAG_ENDpre[104, 7]falsefalse[111, 0]
data/test/data/lex15 ADDED
@@ -0,0 +1,3 @@
1
+ KEYWORDTOC[0, 7]PARA_START[7, 0]TEXT
2
+
3
+ [7, 2]PARA_END[9, 0]SECTION_START==[9, 2]TEXT Headline1 [11, 11]SECTION_END==[22, 3]SECTION_START===[25, 3]TEXT Sub Headline 1a [28, 17]SECTION_END===[45, 4]SECTION_START===[49, 3]TEXT Sub Headline 1b [52, 17]SECTION_END===[69, 4]SECTION_START==[73, 2]TEXT Headline2 [75, 11]SECTION_END==[86, 3]SECTION_START===[89, 3]TEXT Sub Headline 2a [92, 17]SECTION_END===[109, 4]SECTION_START====[113, 4]TEXT Sub Sub Headline [117, 18]TAG_STARTi[135, 3]TEXT2i[138, 2]TAG_ENDi[140, 4]TEXT [144, 1]SECTION_END====[145, 5]SECTION_START====[150, 4]TEXT Sub Sub Headline [154, 18]BOLD_START'''[172, 3]TEXT2ii[175, 3]BOLD_END'''[178, 3]TEXT [181, 1]SECTION_END====[182, 5]SECTION_START===[187, 3]TEXT Sub Headline 2b [190, 17]SECTION_END===[207, 4]falsefalse[211, 0]
data/test/data/lex16 ADDED
@@ -0,0 +1,27 @@
1
+ SECTION_START==[0, 2]TEXT Section [2, 9]SECTION_END==[11, 0]PARA_START[11, 3]TEXTSome text.
2
+
3
+ [14, 12]PARA_END[26, 0]PREINDENT_START[26, 0]TEXT <?xml version="1.0" encoding="UTF-8"?>
4
+ <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "[26, 104]LINK_START[130, 0]TEXThttp://www.apple.com/DTDs/PropertyList-1.0.dtd[130, 46]LINK_END[176, 0]TEXT">
5
+ <plist version="1.0">
6
+ <dict>
7
+ <key>Label</key>
8
+ <string>Update svn repo</string>
9
+ <key>ProgramArguments</key>
10
+ <array>
11
+ <string>updatesvn.sh</string>
12
+ </array>
13
+ <key>StandardErrorPath</key>
14
+ <string>/dev/null</string>
15
+ <key>StandardOutPath</key>
16
+ <string>/dev/null</string>
17
+ <key>StartCalendarInterval</key>
18
+ <dict>
19
+ <key>Hour</key>
20
+ <integer>16</integer>
21
+ <key>Minute</key>
22
+ <integer>40</integer>
23
+ </dict>
24
+ </dict>
25
+ </plist>
26
+ [176, 431]PREINDENT_END[607, 0]PARA_START[607, 0]TEXT
27
+ Some text.[607, 11]TAG_STARTbr[618, 0]TAG_ENDbr[618, 4]TEXTSome other text.[622, 16]TAG_STARTbr[638, 0]TAG_ENDbr[638, 5]TEXTFoo.[643, 4]TAG_STARThr[647, 0]TAG_ENDhr[647, 4]TAG_STARTimg[651, 0]ATTR_NAMEsrc[651, 0]ATTR_VALUEfoo[651, 0]TAG_ENDimg[651, 16]PARA_END[667, 0]falsefalse[667, 0]
data/test/data/lex17 ADDED
@@ -0,0 +1,9 @@
1
+ TABLE_START{|[0, 3]ROW_START[3, 0]CELL_START|[3, 1]TEXT foo
2
+ bar
3
+ zee
4
+ [4, 13]CELL_END[17, 0]CELL_START|[17, 1]TEXT moo
5
+ goo
6
+ [18, 9]CELL_END[27, 0]CELL_START|[27, 1]TEXT attr="value" otherattr="othervalue" [28, 37]CELL_ENDattributes[65, 0]CELL_START|[65, 1]TEXT nah
7
+ mah
8
+ bah
9
+ [66, 13]CELL_END[79, 0]ROW_END[79, 0]TABLE_END|}[79, 3]falsefalse[82, 0]
data/test/data/lex18 ADDED
@@ -0,0 +1,4 @@
1
+ SECTION_START==[0, 2]TEXT Foobar [2, 8]SECTION_END==[10, 3]TABLE_START{|[13, 2]TEXTborder="1px"
2
+ [15, 13]ROW_START[28, 0]HEAD_START![28, 1]TEXTtest
3
+ [29, 5]HEAD_END[34, 0]ROW_END[34, 0]ROW_START|-[34, 3]CELL_START|[37, 1]TEXTa
4
+ [38, 2]CELL_END[40, 0]ROW_END[40, 0]TABLE_END|}[40, 4]SECTION_START==[44, 2]TEXT Foobar [46, 8]SECTION_END==[54, 3]TAG_STARTtable[57, 0]ATTR_NAMEborder[57, 0]ATTR_VALUE1px[57, 21]TAG_STARTthead[78, 8]TAG_STARTtr[86, 4]TAG_STARTth[90, 4]TEXTtest[94, 4]TAG_ENDth[98, 5]TAG_ENDtr[103, 6]TAG_ENDthead[109, 9]TAG_STARTtbody[118, 8]TAG_STARTtr[126, 4]TAG_STARTtd[130, 4]TEXTa[134, 1]TAG_ENDtd[135, 5]TAG_ENDtr[140, 6]TAG_ENDtbody[146, 9]TAG_ENDtable[155, 9]falsefalse[164, 0]
data/test/data/lex19 ADDED
@@ -0,0 +1,27 @@
1
+ TAG_STARTpre[0, 5]TEXT
2
+ foo bar
3
+ [5, 11]TAG_ENDpre[16, 0]PARA_START[16, 8]TAG_STARTcode[24, 6]TEXT
4
+ foo bar
5
+ [30, 11]TAG_ENDcode[41, 7]TEXT
6
+
7
+ [48, 2]PARA_END[50, 0]TAG_STARTp[50, 3]TEXT hi [53, 4]TAG_STARTbr[57, 0]TAG_ENDbr[57, 5]TEXT bye[62, 4]TAG_ENDp[66, 0]PARA_START[66, 4]TEXT
8
+
9
+ [70, 2]PARA_END[72, 0]PARA_START[72, 8]TEXTtest <br/> test
10
+
11
+ [80, 17]PARA_END[106, 0]PARA_START[106, 0]TEXTThere's something important in this example: [106, 45]TAG_STARTcode[151, 6]TEXTint a = [157, 8]BOLD_START'''[165, 3]TEXT2[168, 1]BOLD_END'''[169, 3]TEXT+2;[172, 3]TAG_ENDcode[175, 7]TEXT but I don't know what.
12
+
13
+ [182, 25]PARA_END[207, 0]PARA_START[207, 0]TEXT
14
+ There's something important in this example: [207, 46]TAG_STARTcode[253, 6]TEXTint a = 2+2;[259, 12]TAG_STARTbr[271, 0]TAG_ENDbr[271, 5]TEXT
15
+
16
+ int b = a + 2;
17
+ [276, 17]TAG_ENDcode[293, 7]TEXT but I don't know what.
18
+
19
+ [300, 25]PARA_END[325, 0]TAG_STARTpre[325, 5]TEXT
20
+ Here's some code:
21
+
22
+ <code>
23
+ int a = 2+2;
24
+
25
+ int b = 3+4;
26
+ </code>
27
+ [330, 82]TAG_ENDpre[412, 7]falsefalse[419, 0]
data/test/data/lex2 CHANGED
@@ -1,2 +1,2 @@
1
- HLINE----PARA_STARTTEXT
2
- This is a textPARA_ENDfalsefalse
1
+ HLINE----[0, 4]PARA_START[4, 0]TEXT
2
+ This is a text[4, 15]PARA_END[19, 0]falsefalse[19, 0]
data/test/data/lex20 ADDED
@@ -0,0 +1,7 @@
1
+ TABLE_START{|[0, 2]TEXT border="1" cellpadding="2" cellspacing="0"
2
+ [2, 44]ROW_START[46, 0]CELL_START|[46, 1]TEXT xxx
3
+ [47, 5]CELL_END[52, 0]CELL_START|[52, 2]PREINDENT_START[54, 0]TEXT test
4
+ test
5
+ test
6
+ [54, 21]PREINDENT_END[75, 0]CELL_END[75, 0]CELL_START|[75, 1]TEXT yyy
7
+ [76, 5]CELL_END[81, 0]ROW_END[81, 0]TABLE_END|}[81, 3]falsefalse[84, 0]
data/test/data/lex21 ADDED
@@ -0,0 +1,4 @@
1
+ PASTE_START[0, 8]TEXTThis is '''some''' text pasted from anywhere[8, 44]TAG_STARTbr[52, 1]TAG_ENDbr[53, 0]TEXTwith[53, 4]TAG_STARTbr[57, 1]TAG_ENDbr[58, 0]TEXTnew[58, 3]TAG_STARTbr[61, 1]TAG_ENDbr[62, 0]TEXTlines[62, 5]TAG_STARTbr[67, 1]TAG_ENDbr[68, 0]TEXTand multiple spaces and tabs[68, 34]TAG_STARTbr[102, 1]TAG_ENDbr[103, 0]TEXT and space[103, 10]TAG_STARTbr[113, 1]TAG_ENDbr[114, 0]TEXT and two spaces[114, 16]TAG_STARTbr[130, 1]TAG_ENDbr[131, 0]TEXTwith some[131, 9]TAG_STARTbr[140, 1]TAG_ENDbr[141, 0]TEXT<p attr="xxx" moo="zzz" bar=zzzzz>HTML formatted <a href="foo.bar">text</a> in </p> it.[141, 87]TAG_STARTbr[228, 1]TAG_ENDbr[229, 0]PASTE_END[229, 8]PASTE_START[238, 7]PASTE_END[245, 8]PARA_START[253, 0]TEXT
2
+
3
+
4
+ [253, 3]PARA_END[264, 1]SECTION_START==[265, 2]TEXT Section [267, 9]SECTION_END==[276, 4]PASTE_START[280, 7]TEXTFoo[287, 3]PASTE_END[290, 8]falsefalse[299, 0]
data/test/data/lex22 ADDED
@@ -0,0 +1,3 @@
1
+ KEYWORDTOC[0, 7]PARA_START[7, 0]TEXT
2
+
3
+ [7, 2]PARA_END[9, 0]PARA_START[9, 0]TAG_STARTdiv[9, 6]SECTION_START=[15, 1]TEXT Headline1 [16, 11]SECTION_END=[27, 2]TAG_STARTspan[29, 7]SECTION_START==[36, 2]TEXT Sub Headline 1a [38, 17]SECTION_END==[55, 3]TAG_ENDspan[58, 8]SECTION_START==[66, 2]TEXT Sub Headline 1b [68, 17]SECTION_END==[85, 3]TAG_ENDdiv[88, 7]PARA_END[95, 0]SECTION_START=[95, 1]TEXT Headline2 [96, 11]SECTION_END=[107, 2]TAG_STARTtable[109, 8]TAG_STARTtr[117, 5]TAG_STARTtd[122, 5]SECTION_START==[127, 2]TEXT Sub Headline 2a [129, 17]SECTION_END==[146, 3]TAG_ENDtd[149, 6]TAG_STARTtd[155, 5]SECTION_START==[160, 2]TEXT Sub Headline 2b [162, 17]SECTION_END==[179, 3]TAG_ENDtd[182, 6]TAG_ENDtr[188, 6]TAG_ENDtable[194, 9]falsefalse[203, 0]
data/test/data/lex23 ADDED
@@ -0,0 +1,7 @@
1
+ TAG_STARTpre[0, 5]TEXT
2
+ This is
3
+ preformatted text
4
+
5
+ [5, 34]TAG_ENDpre[39, 8]PREINDENT_START[47, 0]TEXT And this is
6
+ preformatted text
7
+ [47, 36]PREINDENT_END[83, 0]falsefalse[83, 0]
data/test/data/lex3 CHANGED
@@ -1 +1 @@
1
- PARA_STARTTEXT--SIGNATURE_DATE~~~~~SIGNATURE_NAME~~~SIGNATURE_FULL~~~~PARA_ENDfalsefalse
1
+ PARA_START[0, 0]TEXT--[0, 2]SIGNATURE_DATE~~~~~[2, 5]SIGNATURE_NAME~~~[7, 3]SIGNATURE_FULL~~~~[11, 4]PARA_END[16, 0]falsefalse[16, 0]