[SPIP] +installation version 3.0.10
[lhc/web/www.git] / www / plugins-dist / textwheel / wheels / spip / spip.yaml
1 --- # Syntaxe des raccourcis SPIP, version 0.0.1
2 #
3 # Si on nomme une regle, elle devient surchargeable
4
5 traiter_retours_chariots_1:
6 # Harmonise les retours chariots et mange les paragraphes html
7 if_chars: "\r"
8 match: ",\r\n?,S"
9 replace: "\n"
10 priority: -40 # avant tout
11
12 traiter_retours_chariots_2:
13 if_str: "<p"
14 match: ",<p[>[:space:]],iS"
15 replace: "\n\n$0"
16 priority: -40 # avant tout
17
18 traiter_retours_chariots_3:
19 if_str: "</p"
20 match: ",</p[>[:space:]],iS"
21 replace: "$0\n\n"
22 priority: -40 # avant tout
23
24 init-trim:
25 # trim
26 type: all
27 is_callback: y
28 replace: trim
29 priority: -40 # avant tout
30
31 init-saut:
32 type: all
33 replace: "\n$0"
34 priority: -40
35
36 lignes-vides:
37 match: ",^[ \t]+$,m"
38 replace: ""
39 priority: -35 # avant les tableaux
40
41 tableaux:
42 type: all
43 # included subwheel with relative filepath
44 replace: spip/spip-tableaux.yaml
45 is_wheel: Y
46 if_str: "\n|"
47 priority: -30 # avant les raccourcis
48
49 listes:
50 if_str: "\n-"
51 is_wheel: Y
52 type: all
53 replace: spip/spip-listes.yaml
54 priority: -20 # avant !paragraphes
55
56 echappe-tags:
57 # voir restaure-tags plus bas
58 match: ",</?[a-z!][^<>]*?[{}_-][^<>]*>,imsS"
59 if_chars: "{}_-"
60 priority: -20 # avant !paragraphes
61 is_wheel: Y
62 replace:
63 echappe-tags-sub:
64 if_match: "/[{}]|\n[_-]|--/"
65 match: ['{', '}', '_', '-']
66 replace: ["\x1\x1", "\x1\x2", "\x1\x3", "\x1\x4"]
67 type: str
68
69 ligne-horizontale:
70 match: "/\n(----+|____+)/S"
71 replace: "\n\n\n<hr class=\"spip\" />\n\n\n"
72 if_chars: "\n"
73 priority: -20 # avant !paragraphes
74
75 alinea:
76 match: "/\n-- */"
77 replace: "\n<br />&mdash;&nbsp;"
78 if_str: "\n--"
79 priority: -20 # avant !paragraphes
80
81 puce:
82 match: "/\n- */S"
83 replace: replace_puce
84 if_str: "\n-"
85 is_callback: Y
86 priority: -20 # avant !paragraphes
87
88 br:
89 match: "/\n_ +/S"
90 replace: "<br class='manualbr' />"
91 if_str: "\n_"
92 priority: -20 # avant !paragraphes
93
94 abbr:
95 # raccourcis en [ABBR|abbreviation]
96 if_chars: "["
97 if_chars: "|"
98 match: "/\[([^\|\[\]>]+)\|([^\|\]\{>]+)(?:\{([a-z]+)\})?\]/S"
99 is_callback: Y
100 replace: inserer_abbr
101
102 intertitres-compliques:
103 # raccourcis imbriques en {{{{..}}}}
104 # intertitres
105 match: ['/(^|[^{])[{][{][{]/S', '/[}][}][}]($|[^}])/S']
106 replace: ["$1\n\n\n<h3 class=\"spip\">", "</h3>\n\n\n$1"]
107 if_str: '}}}}'
108
109 intertitres:
110 # raccourcis en {{{..}}}
111 # intertitres
112 match: ['{{{', '}}}']
113 replace: ["\n\n\n<h3 class=\"spip\">", "</h3>\n\n\n"]
114 if_str: '{{{'
115 type: str
116
117 gras:
118 # raccourcis en {{..}}
119 # strong
120 match: ['{{', '}}']
121 replace: ['<strong>', '</strong>']
122 type: str
123 if_str: '{{'
124
125 italiques:
126 # raccourcis en {..}
127 # strong
128 match: ['{', '}']
129 replace: ['<i>', '</i>']
130 type: str
131 if_str: '{'
132
133 paragraphes:
134 # paragraphes
135 # lignes vides consecutives, br imbriques dans des p
136 # mais attention pas les br trop riches (ex: br style=clear:both)
137 match: ["/ *\n(?: *\n)+(?:<br ?\/?>)*/S", '/(?:<br\b[^>]*>){2,}\s*/S', "/(<p\b[^>]*>)\n*(?:<br ?\/?>\n*)+/S"]
138 replace: ['<p>', '<p>', '$1']
139 priority: 0
140
141 quote:
142 # raccourci <quote>
143 match: ['<quote>', '</quote>']
144 replace: ['<blockquote class="spip"><p>', '</blockquote><p>']
145 if_str: '<quote>'
146 type: str
147
148 intro:
149 # suppr raccourci <intro>
150 # + suppression de <intro>
151 match: ['<intro>', '</intro>']
152 replace: ['', '']
153 if_str: '<intro>'
154 type: str
155
156 br-restant:
157 # eliminer les br restant en debut de texte
158 match: "@^\n<br />@S"
159 replace: ''
160 if_str: "\n<br"
161 priority: -20 # avant !paragraphes
162
163
164 poesie:
165 # poesie|poetry
166 # utilise une callback
167 match: ",<poe(sie|try)>(.*)</poe(sie|try)>,UimsS"
168 replace: spip/spip-poesie.yaml
169 pick_match: 2
170 is_wheel: Y
171 if_str: '<poe'
172 priority: -40
173
174 restaure-tags:
175 # voir echappe-tags ci-dessus
176 if_chars: "\x1"
177 match: ["\x1\x1", "\x1\x2", "\x1\x3", "\x1\x4"]
178 replace: ['{', '}', '_', '-']
179 type: str