wiki:syntax_highlighting
差别
这里会显示出您选择的修订版和当前版本之间的差别。
| 两侧同时换到之前的修订记录前一修订版 | |||
| wiki:syntax_highlighting [2026/10/13 22:06] – 外部编辑 127.0.0.1 | wiki:syntax_highlighting [2026/10/14 06:19] (当前版本) – 外部编辑 127.0.0.1 | ||
|---|---|---|---|
| 行 12: | 行 12: | ||
| ## Examples | ## Examples | ||
| The following code enables line numbers: | The following code enables line numbers: | ||
| - | | + | |
| + | ```JavaScript [enable_line_numbers=" | ||
| var de = function() { | var de = function() { | ||
| return (typeof(window.de) == ' | return (typeof(window.de) == ' | ||
| }(); | }(); | ||
| - | </ | + | ``` |
| This is the result: | This is the result: | ||
| - | < | + | |
| + | ```JavaScript [enable_line_numbers=" | ||
| var de = function() { | var de = function() { | ||
| return (typeof(window.de) == ' | return (typeof(window.de) == ' | ||
| }(); | }(); | ||
| - | </ | + | ``` |
| The next example additionally highlights one line: | The next example additionally highlights one line: | ||
| - | | + | |
| + | ```JavaScript [enable_line_numbers=" | ||
| var de = function() { | var de = function() { | ||
| return (typeof(window.de) == ' | return (typeof(window.de) == ' | ||
| }(); | }(); | ||
| - | </ | + | ``` |
| This is the result: | This is the result: | ||
| - | < | + | |
| + | ```JavaScript [enable_line_numbers=" | ||
| var de = function() { | var de = function() { | ||
| return (typeof(window.de) == ' | return (typeof(window.de) == ' | ||
| }(); | }(); | ||
| - | </ | + | ``` |
| You can also highlight multiple lines: | You can also highlight multiple lines: | ||
| - | | + | |
| + | ```JavaScript [enable_line_numbers=" | ||
| var de = function() { | var de = function() { | ||
| return (typeof(window.de) == ' | return (typeof(window.de) == ' | ||
| }(); | }(); | ||
| - | </ | + | ``` |
| This is the result: | This is the result: | ||
| - | < | + | |
| + | ```JavaScript [enable_line_numbers=" | ||
| var de = function() { | var de = function() { | ||
| return (typeof(window.de) == ' | return (typeof(window.de) == ' | ||
| }(); | }(); | ||
| - | </ | + | ``` |
| Line numbers can start at any given value: | Line numbers can start at any given value: | ||
| - | | + | |
| + | ```C [enable_line_numbers=" | ||
| void main () { | void main () { | ||
| printf (" | printf (" | ||
| exit 0; | exit 0; | ||
| } | } | ||
| - | </ | + | ``` |
| This is the result: | This is the result: | ||
| - | < | + | |
| + | ```C [enable_line_numbers=" | ||
| void main () { | void main () { | ||
| printf (" | printf (" | ||
| exit 0; | exit 0; | ||
| } | } | ||
| - | </ | + | ``` |
wiki/syntax_highlighting.txt · 最后更改: 由 127.0.0.1
