sytaxhighlighter
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| sytaxhighlighter [2017/02/05 14:39] – walkeradmin | sytaxhighlighter [2017/02/05 14:49] (current) – walkeradmin | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== SyntaxHighLighter ==== | ====== SyntaxHighLighter ==== | ||
| + | <color darkorange> | ||
| + | \\ | ||
| + | \\ | ||
| + | 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. | ||
| + | < | ||
| + | <sxh [XML][; options for SyntaxHighlighter]> | ||
| + | ... code/text ... | ||
| + | </ | ||
| + | </ | ||
| + | \\ | ||
| + | This is a great tool because it can take code that looks like the following (this is Python) | ||
| + | \\ | ||
| + | < | ||
| + | if len(sys.argv)> | ||
| + | WaitTime = int(sys.argv[1])/ | ||
| + | else: | ||
| + | WaitTime = 10/ | ||
| + | </ | ||
| + | \\ | ||
| + | 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, | ||
| + | \\ | ||
| + | <sxh [py][; options for SyntaxHighlighter]> | ||
| + | if len(sys.argv)> | ||
| + | WaitTime = int(sys.argv[1])/ | ||
| + | else: | ||
| + | WaitTime = 10/ | ||
| + | </ | ||
| + | \\ | ||
| \\ | \\ | ||
| - | + | ---- | |
| - | + | ==== Available Brush Types ==== | |
| - | + | \\ | |
| < | < | ||
| Brush name Brush aliases | Brush name Brush aliases | ||
sytaxhighlighter.1486305592.txt.gz · Last modified: (external edit)
