|
74 | 74 | # [3]: https://confluence.atlassian.com/confcloud/code-block-macro-724765175.html |
75 | 75 | # [4]: http://pygments.org/docs/lexers/ |
76 | 76 | # [5]: http://www.sphinx-doc.org/en/stable/markup/code.html |
77 | | -LITERAL2LANG_MAP_V1 = { |
| 77 | +LITERAL2LANG_MAP_COMMON = { |
| 78 | + # (none) |
| 79 | + 'none': 'none', |
| 80 | + 'raw': 'none', |
| 81 | + 'text': 'none', |
78 | 82 | # ActionScript |
79 | 83 | 'actionscript3': 'actionscript3', |
80 | 84 | 'as3': 'actionscript3', |
81 | 85 | # AppleScript (Confluence >=6.0) |
82 | 86 | 'applescript': 'applescript', |
83 | | - # Bash |
84 | | - 'bash': 'bash', |
85 | | - 'ksh': 'bash', |
86 | | - 'sh': 'bash', |
87 | | - 'shell': 'bash', |
88 | | - 'zsh': 'bash', |
89 | | - # C# |
90 | | - 'c#': 'csharp', |
91 | | - 'csharp': 'csharp', |
92 | 87 | # C++ |
93 | | - 'c': 'cpp', |
94 | 88 | 'c++': 'cpp', |
95 | 89 | 'cpp': 'cpp', |
96 | 90 | # ColdFusion |
97 | 91 | 'cfc': 'coldfusion', |
98 | 92 | 'coldfusion': 'coldfusion', |
99 | | - # CSS |
100 | | - 'css': 'css', |
101 | | - # Delphi |
102 | | - 'delphi': 'delphi', |
103 | | - 'pas': 'delphi', |
104 | | - 'pascal': 'delphi', |
105 | | - 'objectpascal': 'delphi', |
106 | 93 | # Diff |
107 | 94 | 'diff': 'diff', |
108 | 95 | 'udiff': 'diff', |
109 | | - # Erlang |
110 | | - 'erlang': 'erlang', |
111 | 96 | # Groovy |
112 | 97 | 'groovy': 'groovy', |
113 | | - # HTML and XML |
114 | | - 'html': 'html/xml', |
115 | | - 'html/xml': 'html/xml', |
116 | | - 'xml': 'html/xml', |
117 | | - 'xslt': 'html/xml', |
118 | 98 | # Java |
119 | 99 | 'java': 'java', |
120 | 100 | # Java FX |
121 | 101 | 'javafx': 'javafx', |
122 | | - # JavaScript |
123 | | - 'javascript': 'javascript', |
124 | | - 'js': 'javascript', |
125 | | - # Plain Text |
126 | | - 'none': 'none', |
127 | | - 'raw': 'none', |
128 | | - 'text': 'none', |
129 | 102 | # Perl (Confluence <=5.10) |
130 | 103 | 'perl': 'perl', |
131 | 104 | 'pl': 'perl', |
|
139 | 112 | 'powershell': 'powershell', |
140 | 113 | 'ps1': 'powershell', |
141 | 114 | 'psm1': 'powershell', |
| 115 | + 'pwsh': 'powershell', |
142 | 116 | # Python |
| 117 | + 'bazel': 'python', |
143 | 118 | 'py': 'python', |
144 | 119 | 'py3': 'python', |
145 | 120 | 'python': 'python', |
146 | 121 | 'python3': 'python', |
147 | 122 | 'sage': 'python', |
| 123 | + 'starlark': 'python', |
148 | 124 | # Ruby |
149 | 125 | 'duby': 'ruby', |
150 | 126 | 'rb': 'ruby', |
|
153 | 129 | 'sass': 'sass', |
154 | 130 | # Scala |
155 | 131 | 'scala': 'scala', |
| 132 | + # Shell |
| 133 | + 'bash': 'bash', |
| 134 | + 'ksh': 'bash', |
| 135 | + 'openrc': 'bash', |
| 136 | + 'sh': 'bash', |
| 137 | + 'shell': 'bash', |
| 138 | + 'zsh': 'bash', |
156 | 139 | # SQL |
157 | 140 | 'sql': 'sql', |
158 | 141 | # Visual Basic |
159 | 142 | 'vb': 'vb', |
160 | 143 | 'vbscript': 'vb', |
| 144 | + 'visualbasic': 'vb', |
161 | 145 | # YAML (Confluence Server >=6.7) |
162 | 146 | 'yaml': 'yaml', |
| 147 | +} |
| 148 | + |
| 149 | +LITERAL2LANG_MAP_V1 = { |
| 150 | + **LITERAL2LANG_MAP_COMMON, |
| 151 | + # C# |
| 152 | + 'c#': 'csharp', |
| 153 | + 'csharp': 'csharp', |
| 154 | + # C |
| 155 | + 'c': 'cpp', |
| 156 | + # CSS |
| 157 | + 'css': 'css', |
| 158 | + # Delphi |
| 159 | + 'delphi': 'delphi', |
| 160 | + 'pas': 'delphi', |
| 161 | + 'pascal': 'delphi', |
| 162 | + 'objectpascal': 'delphi', |
| 163 | + # Erlang |
| 164 | + 'erlang': 'erlang', |
| 165 | + # HTML and XML |
| 166 | + 'html': 'html/xml', |
| 167 | + 'html/xml': 'html/xml', |
| 168 | + 'xml': 'html/xml', |
| 169 | + 'xslt': 'html/xml', |
| 170 | + # JavaScript |
| 171 | + 'javascript': 'javascript', |
| 172 | + 'js': 'javascript', |
163 | 173 | # (special) |
164 | 174 | # Sphinx's default highlight language is based off a superset of 'python'. |
165 | 175 | # To follow Sphinx's method of highlighting, use Confluence's 'python' |
|
170 | 180 | } |
171 | 181 |
|
172 | 182 | LITERAL2LANG_MAP_V2 = { |
173 | | - # (none) |
174 | | - 'none': 'none', |
175 | | - 'raw': 'none', |
| 183 | + **LITERAL2LANG_MAP_COMMON, |
176 | 184 | # ABAP |
177 | 185 | 'abap': 'abap', |
178 | | - # ActionScript |
179 | | - 'actionscript3': 'actionscript3', |
180 | | - 'as3': 'actionscript3', |
181 | 186 | # Ada |
182 | 187 | 'ada': 'ada', |
183 | 188 | 'ada2005': 'ada', |
184 | 189 | 'ada95': 'ada', |
185 | | - # AppleScript |
186 | | - 'applescript': 'applescript', |
187 | 190 | # Arduino |
188 | 191 | 'arduino': 'arduino', |
189 | 192 | # Autoit |
190 | 193 | 'autoit': 'autoit', |
191 | 194 | # C |
192 | 195 | 'c': 'c', |
193 | | - # C++ |
194 | | - 'c++': 'cpp', |
195 | | - 'cpp': 'cpp', |
196 | 196 | # C# |
197 | 197 | 'c#': 'c#', |
198 | 198 | 'csharp': 'c#', |
|
203 | 203 | 'coffee': 'coffeescript', |
204 | 204 | 'coffee-script': 'coffeescript', |
205 | 205 | 'coffeescript': 'coffeescript', |
206 | | - # ColdFusion |
207 | | - 'cfc': 'coldfusion', |
208 | | - 'coldfusion': 'coldfusion', |
209 | 206 | # CSS |
210 | 207 | 'css': 'css', |
211 | 208 | # CUDA |
|
215 | 212 | 'd': 'd', |
216 | 213 | # Dart |
217 | 214 | 'dart': 'dart', |
218 | | - # Diff |
219 | | - 'diff': 'diff', |
220 | | - 'udiff': 'diff', |
| 215 | + # Dockerfile |
| 216 | + 'docker': 'docker', |
| 217 | + 'dockerfile': 'docker', |
221 | 218 | # Elixir |
222 | 219 | 'elixir': 'elixir', |
223 | 220 | 'ex': 'elixir', |
|
237 | 234 | 'golang': 'go', |
238 | 235 | # GraphQL |
239 | 236 | 'graphql': 'graphql', |
240 | | - # Groovy |
241 | | - 'groovy': 'groovy', |
242 | 237 | # Haskell |
243 | 238 | 'haskell': 'haskell', |
244 | 239 | 'hs': 'haskell', |
245 | 240 | # Haxe |
246 | 241 | 'haxe': 'haxe', |
247 | 242 | 'hx': 'haxe', |
248 | 243 | 'hxsl': 'haxe', |
| 244 | + # HCL |
| 245 | + 'hcl': 'hcl', |
| 246 | + 'terraform': 'hcl', |
| 247 | + 'tf': 'hcl', |
249 | 248 | # HTML and XML |
250 | 249 | 'html': 'html', |
251 | | - # Java |
252 | | - 'java': 'java', |
253 | | - # Java FX |
254 | | - 'javafx': 'javafx', |
255 | 250 | # JavaScript |
256 | 251 | 'javascript': 'js', |
257 | 252 | 'js': 'js', |
|
276 | 271 | 'nb': 'mathematica', |
277 | 272 | # MATLAB |
278 | 273 | 'matlab': 'matlab', |
| 274 | + # NGINX |
| 275 | + 'nginx': 'nginx', |
279 | 276 | # Objective-C |
280 | 277 | 'obj-c': 'objective-c', |
281 | 278 | 'objc': 'objective-c', |
|
295 | 292 | 'pas': 'pas', |
296 | 293 | 'pascal': 'pas', |
297 | 294 | 'objectpascal': 'pas', |
298 | | - # Perl |
299 | | - 'perl': 'perl', |
300 | | - 'pl': 'perl', |
301 | | - # PHP |
302 | | - 'php': 'php', |
303 | | - 'php3': 'php', |
304 | | - 'php4': 'php', |
305 | | - 'php5': 'php', |
306 | | - # Plain Text |
307 | | - 'text': 'text', |
308 | | - # PowerShell |
309 | | - 'posh': 'powershell', |
310 | | - 'powershell': 'powershell', |
311 | | - 'ps1': 'powershell', |
312 | | - 'psm1': 'powershell', |
313 | 295 | # Prolog |
314 | 296 | 'prolog': 'prolog', |
| 297 | + # Protocol Buffers |
| 298 | + 'proto': 'protobuf', |
| 299 | + 'protobuf': 'protobuf', |
315 | 300 | # Puppet |
316 | 301 | 'puppet': 'puppet', |
317 | | - # Python |
318 | | - 'py': 'py', |
319 | | - 'py3': 'py', |
320 | | - 'python': 'py', |
321 | | - 'python3': 'py', |
322 | | - 'sage': 'py', |
323 | 302 | # QML |
324 | 303 | 'qbs': 'qbs', |
325 | 304 | 'qml': 'qbs', |
|
332 | 311 | 'rest': 'restructuredtext', |
333 | 312 | 'restructuredtext': 'restructuredtext', |
334 | 313 | 'rst': 'restructuredtext', |
335 | | - # Ruby |
336 | | - 'duby': 'ruby', |
337 | | - 'rb': 'ruby', |
338 | | - 'ruby': 'ruby', |
339 | 314 | # Rust |
340 | 315 | 'rs': 'rust', |
341 | 316 | 'rust': 'rust', |
342 | | - # Sass |
343 | | - 'sass': 'sass', |
344 | | - # Scala |
345 | | - 'scala': 'scala', |
346 | 317 | # Scheme |
347 | 318 | 'scm': 'scheme', |
348 | 319 | 'scheme': 'scheme', |
349 | | - # Shell |
350 | | - 'bash': 'bash', |
351 | | - 'ksh': 'bash', |
352 | | - 'sh': 'bash', |
353 | | - 'shell': 'bash', |
354 | | - 'zsh': 'bash', |
355 | 320 | # Smalltalk |
356 | 321 | 'smalltalk': 'smalltalk', |
357 | 322 | 'squeak': 'smalltalk', |
358 | 323 | 'st': 'smalltalk', |
359 | 324 | # SplunkSPL |
360 | 325 | 'spl': 'splunk-spl', |
361 | 326 | 'splunkspl': 'splunk-spl', |
362 | | - # SQL |
363 | | - 'sql': 'sql', |
364 | 327 | # StandardML |
365 | 328 | 'sml': 'standardml', |
366 | 329 | 'standardml': 'standardml', |
|
390 | 353 | 'verilog': 'verilog', |
391 | 354 | # VHDL |
392 | 355 | 'vhdl': 'vhdl', |
393 | | - # Visual Basic |
394 | | - 'vb': 'vb', |
395 | | - 'vbscript': 'vb', |
396 | | - 'visualbasic': 'vb', |
397 | 356 | # XML |
398 | 357 | 'xml': 'xml', |
399 | 358 | 'xslt': 'xml', |
|
403 | 362 | 'xqm': 'xquery', |
404 | 363 | 'xquery': 'xquery', |
405 | 364 | 'xqy': 'xquery', |
406 | | - # YAML |
407 | | - 'yaml': 'yaml', |
408 | 365 | # (special) |
409 | 366 | # Sphinx's default highlight language is based off a superset of 'python'. |
410 | 367 | # To follow Sphinx's method of highlighting, use Confluence's 'python' |
|
442 | 399 | 'swig': 'cpp', |
443 | 400 | 'vala': 'cpp', |
444 | 401 | 'vapi': 'cpp', |
| 402 | + # YAML-like languages |
| 403 | + 'salt': 'yaml', |
| 404 | + 'sls': 'yaml', |
| 405 | + 'yaml+jinja': 'yaml', |
445 | 406 | } |
446 | 407 |
|
447 | 408 | LITERAL2LANG_FBMAP_V1 = { |
|
0 commit comments