User Tools

Site Tools


sytaxhighlighter

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
sytaxhighlighter [2017/02/05 14:39] 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 aliases          File name Brush name                Brush aliases          File name
sytaxhighlighter.1486305592.txt.gz · Last modified: 2023/03/09 22:35 (external edit)