用户工具

站点工具


wiki:syntax_highlighting

差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

两侧同时换到之前的修订记录前一修订版
wiki:syntax_highlighting [2026/10/13 22:06] – 外部编辑 127.0.0.1wiki: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:
-  <code JavaScript [enable_line_numbers="true"]>+   
 +```JavaScript [enable_line_numbers="true"]
   var de = function() {   var de = function() {
   return (typeof(window.de) == 'object') ? window.de : {};   return (typeof(window.de) == 'object') ? window.de : {};
   }();   }();
-  </code>+``` 
  
 This is the result: This is the result:
  
-<code JavaScript [enable_line_numbers="true"]>+ 
 +```JavaScript [enable_line_numbers="true"]
 var de = function() { var de = function() {
  return (typeof(window.de) == 'object') ? window.de : {};  return (typeof(window.de) == 'object') ? window.de : {};
 }(); }();
-</code>+``` 
  
 The next example additionally highlights one line: The next example additionally highlights one line:
-  <code JavaScript [enable_line_numbers="true",highlight_lines_extra="2"]>+   
 +```JavaScript [enable_line_numbers="true",highlight_lines_extra="2"]
   var de = function() {   var de = function() {
   return (typeof(window.de) == 'object') ? window.de : {};   return (typeof(window.de) == 'object') ? window.de : {};
   }();   }();
-  </code>+``` 
  
 This is the result: This is the result:
-<code JavaScript [enable_line_numbers="true",highlight_lines_extra="2"]>+ 
 +```JavaScript [enable_line_numbers="true",highlight_lines_extra="2"]
 var de = function() { var de = function() {
  return (typeof(window.de) == 'object') ? window.de : {};  return (typeof(window.de) == 'object') ? window.de : {};
 }(); }();
-</code>+``` 
  
 You can also highlight multiple lines: You can also highlight multiple lines:
-  <code JavaScript [enable_line_numbers="true",highlight_lines_extra="2,3"]>+   
 +```JavaScript [enable_line_numbers="true",highlight_lines_extra="2,3"]
   var de = function() {   var de = function() {
   return (typeof(window.de) == 'object') ? window.de : {};   return (typeof(window.de) == 'object') ? window.de : {};
   }();   }();
-  </code>+``` 
  
 This is the result: This is the result:
-<code JavaScript [enable_line_numbers="true",highlight_lines_extra="2,3"]>+ 
 +```JavaScript [enable_line_numbers="true",highlight_lines_extra="2,3"]
 var de = function() { var de = function() {
  return (typeof(window.de) == 'object') ? window.de : {};  return (typeof(window.de) == 'object') ? window.de : {};
 }(); }();
-</code>+``` 
  
 Line numbers can start at any given value: Line numbers can start at any given value:
-  <code C [enable_line_numbers="true", start_line_numbers_at="42"]>+   
 +```C [enable_line_numbers="true", start_line_numbers_at="42"]
   void main () {   void main () {
       printf ("Hello World!");       printf ("Hello World!");
       exit 0;       exit 0;
   }   }
-  </code>+``` 
  
 This is the result: This is the result:
  
-<code C [enable_line_numbers="true", start_line_numbers_at="42"]>+ 
 +```C [enable_line_numbers="true", start_line_numbers_at="42"]
 void main () { void main () {
     printf ("Hello World!");     printf ("Hello World!");
     exit 0;     exit 0;
 } }
-</code>+``` 
  
wiki/syntax_highlighting.txt · 最后更改: 由 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki