1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176
|_. foo |<_. bar |>_. baz |
|<>. foo |(((. bar |)). baz |
|~. foo |^. bar |=. baz |
|/2. bar |\2. foo
bar
baz |
|\2~>. foobarbaz |
(foo).|(bar).Baz|
(#foo).|(#bar).Baz|
[fr].|[en].Baz|
{color: blue}.|{font-weight:bold}.Baz|
(foo#bar){font-style:italic}[fr].|{background:red;}(bar#baz)[en].Baz|
|*bold*|**bold**|_italic_|__italic__|
|??cite??|@code@|+inserted+|-deleted-|
|%span%|"foo":http://example.com|!foo.jpg!|bar[2]|
|\2.CSS(Cascading Style Sheet)|\2.Foo(TM)|
----------------------------------------------------
[
["phrase", [
["table", [
["punctuation", "|"],
["modifier", [["punctuation", "_"]]],
["punctuation", "."],
" foo ",
["punctuation", "|"],
["modifier", [["punctuation", "<"], ["punctuation", "_"]]],
["punctuation", "."],
" bar ",
["punctuation", "|"],
["modifier", [["punctuation", ">"], ["punctuation", "_"]]],
["punctuation", "."],
" baz ", ["punctuation", "|"],
["punctuation", "|"],
["modifier", [["punctuation", "<"], ["punctuation", ">"]]],
["punctuation", "."],
" foo ",
["punctuation", "|"],
["modifier", [["punctuation", "("], ["punctuation", "("], ["punctuation", "("]]],
["punctuation", "."],
" bar ",
["punctuation", "|"],
["modifier", [["punctuation", ")"], ["punctuation", ")"]]],
["punctuation", "."],
" baz ", ["punctuation", "|"],
["punctuation", "|"],
["modifier", [["punctuation", "~"]]],
["punctuation", "."],
" foo ",
["punctuation", "|"],
["modifier", [["punctuation", "^"]]],
["punctuation", "."],
" bar ",
["punctuation", "|"],
["modifier", [["punctuation", "="]]],
["punctuation", "."],
" baz ", ["punctuation", "|"],
["punctuation", "|"],
["modifier", [["punctuation", "/2"]]],
["punctuation", "."],
" bar ",
["punctuation", "|"],
["modifier", [["punctuation", "\\2"]]],
["punctuation", "."],
" foo\r\nbar\r\nbaz ", ["punctuation", "|"],
["punctuation", "|"],
["modifier", [["punctuation", "\\2"], ["punctuation", "~"], ["punctuation", ">"]]],
["punctuation", "."],
" foobarbaz ", ["punctuation", "|"]
]]
]],
["phrase", [
["table", [
["modifier", [
["punctuation", "("], ["class-id", "foo"], ["punctuation", ")"]
]],
["punctuation", "."], ["punctuation", "|"],
["modifier", [
["punctuation", "("], ["class-id", "bar"], ["punctuation", ")"]
]],
["punctuation", "."], "Baz", ["punctuation", "|"],
["modifier", [
["punctuation", "("], ["class-id", "#foo"], ["punctuation", ")"]
]],
["punctuation", "."], ["punctuation", "|"],
["modifier", [
["punctuation", "("], ["class-id", "#bar"], ["punctuation", ")"]
]],
["punctuation", "."], "Baz", ["punctuation", "|"],
["modifier", [
["punctuation", "["], ["lang", "fr"], ["punctuation", "]"]
]],
["punctuation", "."], ["punctuation", "|"],
["modifier", [
["punctuation", "["], ["lang", "en"], ["punctuation", "]"]
]],
["punctuation", "."], "Baz", ["punctuation", "|"],
["modifier", [
["css", ["{color: blue}"]]
]],
["punctuation", "."], ["punctuation", "|"],
["modifier", [
["css", ["{font-weight:bold}"]]
]],
["punctuation", "."], "Baz", ["punctuation", "|"],
["modifier", [
["punctuation", "("], ["class-id", "foo#bar"], ["punctuation", ")"],
["css", ["{font-style:italic}"]],
["punctuation", "["], ["lang", "fr"], ["punctuation", "]"]
]],
["punctuation", "."], ["punctuation", "|"],
["modifier", [
["css", ["{background:red;}"]],
["punctuation", "("], ["class-id", "bar#baz"], ["punctuation", ")"],
["punctuation", "["], ["lang", "en"], ["punctuation", "]"]
]],
["punctuation", "."], "Baz", ["punctuation", "|"]
]]
]],
["phrase", [
["table", [
["punctuation", "|"],
["inline", [["punctuation", "*"], ["bold", "bold"], ["punctuation", "*"]]],
["punctuation", "|"],
["inline", [["punctuation", "**"], ["bold", "bold"], ["punctuation", "**"]]],
["punctuation", "|"],
["inline", [["punctuation", "_"], ["italic", "italic"], ["punctuation", "_"]]],
["punctuation", "|"],
["inline", [["punctuation", "__"], ["italic", "italic"], ["punctuation", "__"]]],
["punctuation", "|"],
["punctuation", "|"],
["inline", [["punctuation", "??"], ["cite", "cite"], ["punctuation", "??"]]],
["punctuation", "|"],
["inline", [["punctuation", "@"], ["code", "code"], ["punctuation", "@"]]],
["punctuation", "|"],
["inline", [["punctuation", "+"], ["inserted", "inserted"], ["punctuation", "+"]]],
["punctuation", "|"],
["inline", [["punctuation", "-"], ["deleted", "deleted"], ["punctuation", "-"]]],
["punctuation", "|"],
["punctuation", "|"],
["inline", [["punctuation", "%"], ["span", "span"], ["punctuation", "%"]]],
["punctuation", "|"],
["link", [["punctuation", "\""], ["text", "foo"], ["punctuation", "\""], ["punctuation", ":"], ["url", "http://example.com"]]],
["punctuation", "|"],
["image", [["punctuation", "!"], ["source", "foo.jpg"], ["punctuation", "!"]]],
["punctuation", "|"],
"bar", ["footnote", [["punctuation", "["], "2", ["punctuation", "]"]]],
["punctuation", "|"],
["punctuation", "|"], ["modifier", [["punctuation", "\\2"]]], ["punctuation", "."],
["acronym", ["CSS", ["punctuation", "("], ["comment", "Cascading Style Sheet"], ["punctuation", ")"]]],
["punctuation", "|"], ["modifier", [["punctuation", "\\2"]]], ["punctuation", "."],
"Foo", ["mark", [["punctuation", "("], "TM", ["punctuation", ")"]]],
["punctuation", "|"]
]]
]]
]
----------------------------------------------------
Checks for tables with alignment modifiers and spanning.
Also checks for nesting inline styles.