-
Notifications
You must be signed in to change notification settings - Fork 80
/
Copy pathlinks6.test
71 lines (71 loc) · 5.41 KB
/
links6.test
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
.#-----------------------------------------------------
.input|xwiki/2.0
.# [[{{macro}}]] a macro as label
.# [[Label>Reference]] just a reference, the > need to be double to be matched as a link syntax
.# [[Reference|Param=Value]] just a reference, the | need to be double to be matched as a link syntax
.# [[[[no link]]>>Not Reference]] only images are valid sub-links syntaxes
.# [[[[image:whatever>>Reference]] only images are valid sub-links syntaxes
.# not:link not matched as a link
.#-----------------------------------------------------
[[{{macro}}]]
[[Label>Reference]]
[[Reference|Param=Value]]
[[[[no link]]>>Not Reference]]
[[[[image:whatever>>Reference]]
not:link
.#-----------------------------------------------------
.expect|event/1.0
.#-----------------------------------------------------
beginDocument
beginParagraph
beginLink [Typed = [false] Type = [doc] Reference = [{{macro}}]] [false]
endLink [Typed = [false] Type = [doc] Reference = [{{macro}}]] [false]
onNewLine
beginLink [Typed = [false] Type = [doc] Reference = [Label>Reference]] [false]
endLink [Typed = [false] Type = [doc] Reference = [Label>Reference]] [false]
onNewLine
beginLink [Typed = [false] Type = [doc] Reference = [Reference|Param=Value]] [false]
endLink [Typed = [false] Type = [doc] Reference = [Reference|Param=Value]] [false]
onNewLine
beginLink [Typed = [false] Type = [doc] Reference = [[[no link]] [false]
endLink [Typed = [false] Type = [doc] Reference = [[[no link]] [false]
onSpecialSymbol [>]
onSpecialSymbol [>]
onWord [Not]
onSpace
onWord [Reference]
onSpecialSymbol []]
onSpecialSymbol []]
onNewLine
beginLink [Typed = [false] Type = [doc] Reference = [Reference]] [false]
onSpecialSymbol [[]
onSpecialSymbol [[]
onImage [Typed = [false] Type = [attach] Reference = [whatever]] [true] [Iwhatever]
endLink [Typed = [false] Type = [doc] Reference = [Reference]] [false]
onNewLine
onWord [not]
onSpecialSymbol [:]
onWord [link]
endParagraph
endDocument
.#-----------------------------------------------------
.expect|xhtml/1.0
.#-----------------------------------------------------
<p><span class="wikicreatelink"><a href="editurl"><span class="wikigeneratedlinkcontent">{{macro}}</span></a></span><br/><span class="wikicreatelink"><a href="editurl"><span class="wikigeneratedlinkcontent">Label>Reference</span></a></span><br/><span class="wikicreatelink"><a href="editurl"><span class="wikigeneratedlinkcontent">Reference|Param=Value</span></a></span><br/><span class="wikicreatelink"><a href="editurl"><span class="wikigeneratedlinkcontent">[[no link</span></a></span>>>Not Reference]]<br/><span class="wikicreatelink"><a href="editurl">[[<img src="imageurl" class="wikimodel-freestanding wikigeneratedid" id="Iwhatever" alt="whatever"/></a></span><br/>not:link</p>
.#-----------------------------------------------------
.expect|annotatedxhtml/1.0
.#-----------------------------------------------------
<p><!--startwikilink:false|-|doc|-|\{\{macro}}--><span class="wikicreatelink"><a href="editurl"><span class="wikigeneratedlinkcontent">{{macro}}</span></a></span><!--stopwikilink--><br/><!--startwikilink:false|-|doc|-|Label>Reference--><span class="wikicreatelink"><a href="editurl"><span class="wikigeneratedlinkcontent">Label>Reference</span></a></span><!--stopwikilink--><br/><!--startwikilink:false|-|doc|-|Reference|Param=Value--><span class="wikicreatelink"><a href="editurl"><span class="wikigeneratedlinkcontent">Reference|Param=Value</span></a></span><!--stopwikilink--><br/><!--startwikilink:false|-|doc|-|[[no link--><span class="wikicreatelink"><a href="editurl"><span class="wikigeneratedlinkcontent">[[no link</span></a></span><!--stopwikilink-->>>Not Reference]]<br/><!--startwikilink:false|-|doc|-|Reference--><span class="wikicreatelink"><a href="editurl">[[<!--startimage:false|-|attach|-|whatever--><img src="imageurl" class="wikimodel-freestanding wikigeneratedid" id="Iwhatever" alt="whatever"/><!--stopimage--></a></span><!--stopwikilink--><br/>not:link</p>
.#-----------------------------------------------------
.expect|xwiki/2.0
.#-----------------------------------------------------
[[{{macro}}]]
[[Label>Reference]]
[[Reference|Param=Value]]
[[[[no link]]>>Not Reference]]
[[~~~[~~~[image:whatever>>Reference]]
not:link
.#-----------------------------------------------------
.input|xhtml/1.0
.#-----------------------------------------------------
<p><!--startwikilink:false|-|doc|-|{{macro}}--><span class="wikicreatelink"><a href="editurl"><span class="wikigeneratedlinkcontent">{{macro}}</span></a></span><!--stopwikilink--><br/><!--startwikilink:false|-|doc|-|Label>Reference--><span class="wikicreatelink"><a href="editurl"><span class="wikigeneratedlinkcontent">Label>Reference</span></a></span><!--stopwikilink--><br/><!--startwikilink:false|-|doc|-|Reference|Param=Value--><span class="wikicreatelink"><a href="editurl"><span class="wikigeneratedlinkcontent">Reference|Param=Value</span></a></span><!--stopwikilink--><br/><!--startwikilink:false|-|doc|-|[[no link--><span class="wikicreatelink"><a href="editurl"><span class="wikigeneratedlinkcontent">[[no link</span></a></span><!--stopwikilink-->>>Not Reference]]<br/><!--startwikilink:false|-|doc|-|Reference--><span class="wikicreatelink"><a href="editurl">[[<!--startimage:false|-|attach|-|whatever--><img src="imageurl" class="wikimodel-freestanding wikigeneratedid" id="Iwhatever" alt="whatever"/><!--stopimage--></a></span><!--stopwikilink--><br/>not:link</p>