User Tools

Site Tools


sytaxhighlighter

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
sytaxhighlighter [2017/02/05 14:35] – created walkeradminsytaxhighlighter [2023/03/09 22:35] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ====== SyntaxHighLighter ==== ====== SyntaxHighLighter ====
 +<color darkorange>Feb 2017</color>
 +\\ 
 +\\ 
 +SyntaxHighLigher is a plugin for DokuWiki. What this plugin does is to correctly format text where formatting would otherwise be lost (Python for an example).
 +\\ 
 +\\ 
 +The SyntaxHighLighter uses brushes to select the formatting of the text, so if you wish to show XML code, then you select the XML brush, as shown below.
 +<file>
 +<sxh [XML][; options for SyntaxHighlighter]>
 +... code/text ...
 +</sxh>
 +</file>
 +\\ 
 +This is a great tool because it can take code that looks like the following (this is Python)
 +\\ 
 +<file>
 +if len(sys.argv)>1:
 +  WaitTime = int(sys.argv[1])/float(1000)
 +else:
 +  WaitTime = 10/float(1000)
 +</file>
 +\\ 
 +So yes it is readable, and stands out, but the formatting is much nicer if it looks similar to how it would in an actual Python development environment, like this:
 +\\ 
 +<sxh [py][; options for SyntaxHighlighter]>
 +if len(sys.argv)>1:
 +  WaitTime = int(sys.argv[1])/float(1000)
 +else:
 +  WaitTime = 10/float(1000)
 +</sxh>
 +\\ 
 \\  \\ 
  
- +---- 
- +==== Available Brush Types ==== 
- +\\ 
 <file> <file>
-Brush name +Brush name                Brush aliases          File name 
-Brush aliases + 
-File name +ActionScript3             as3, actionscript3                 shBrushAS3.js 
-ActionScript3 +Bash/shell                bash, shell                        shBrushBash.js 
-as3, actionscript3 +ColdFusion                cf, coldfusion                     shBrushColdFusion.js 
-shBrushAS3.js +C#                        c-sharp, csharp                    shBrushCSharp.js 
-Bash/shell +C++                       cpp, c                             shBrushCpp.js 
-bash, shell +CSS                       css                                shBrushCss.js 
-shBrushBash.js +Delphi                    delphi, pas, pascal                shBrushDelphi.js 
-ColdFusion +Diff                      diff, patch                        shBrushDiff.js 
-cf, coldfusion +Erlang                    erl, erlang                        shBrushErlang.js 
-shBrushColdFusion.js +Groovy                    groovy                             shBrushGroovy.js 
-C# +JavaScript                js, jscript, javascript            shBrushJScript.js 
-c-sharp, csharp +Java                      java                               shBrushJava.js 
-shBrushCSharp.js +JavaFX                    jfx, javafx                        shBrushJavaFX.js 
-C++ +Perl                      perl, pl                           shBrushPerl.js 
-cpp, c +PHP                       php                                shBrushPhp.js 
-shBrushCpp.js +Plain Text                plain, text                        shBrushPlain.js 
-CSS +PowerShell                ps, powershell                     shBrushPowerShell.js 
-css +Python                    py, python                         shBrushPython.js 
-shBrushCss.js +Ruby                      rails, ror, ruby                   shBrushRuby.js 
-Delphi +Scala                     scala                              shBrushScala.js 
-delphi, pas, pascal +SQL                       sql                                shBrushSql.js 
-shBrushDelphi.js +Visual Basic              vb, vbnet                          shBrushVb.js 
-Diff +XML                       xml, xhtml, xslt, html, xhtml      shBrushXml.js
-diff, patch +
-shBrushDiff.js +
-Erlang +
-erl, erlang +
-shBrushErlang.js +
-Groovy +
-groovy +
-shBrushGroovy.js +
-JavaScript +
-js, jscript, javascript +
-shBrushJScript.js +
-Java +
-java +
-shBrushJava.js +
-JavaFX +
-jfx, javafx +
-shBrushJavaFX.js +
-Perl +
-perl, pl +
-shBrushPerl.js +
-PHP +
-php +
-shBrushPhp.js +
-Plain Text +
-plain, text +
-shBrushPlain.js +
-PowerShell +
-ps, powershell +
-shBrushPowerShell.js +
-Python +
-py, python +
-shBrushPython.js +
-Ruby +
-rails, ror, ruby +
-shBrushRuby.js +
-Scala +
-scala +
-shBrushScala.js +
-SQL +
-sql +
-shBrushSql.js +
-Visual Basic +
-vb, vbnet +
-shBrushVb.js +
-XML +
-xml, xhtml, xslt, html, xhtml +
-shBrushXml.js+
 </file> </file>
sytaxhighlighter.1486305347.txt.gz · Last modified: 2023/03/09 22:35 (external edit)