| 77 | }}} |
| 78 | |
| 79 | |
| 80 | == Syntax Highlighting and code blocks |
| 81 | |
| 82 | Trac uses [https://pygments.org/docs/lexers/ pygments] to do syntax highlighting in code blocks |
| 83 | {{{ |
| 84 | {{{#!shell |
| 85 | echo "foo" |
| 86 | }}} |
| 87 | |
| 88 | or |
| 89 | |
| 90 | {{{#!ruby |
| 91 | defTopology('rxnode') { |t| |
| 92 | # Load the topology of imaged nodes |
| 93 | # These nodes are from most recent omf load command |
| 94 | baseTopo = Topology['system:topo:imaged'] |
| 95 | |
| 96 | # Draw a random node from the pool of active ones |
| 97 | aNode = baseTopo.getUniqueRandomNode |
| 98 | |
| 99 | # Add this random node to this 'senderTopo' topology |
| 100 | t.addNode(aNode) |
| 101 | puts "RX: #{t.getNodeByIndex(0).to_s}" |
| 102 | } |
| 103 | }}} |
| 104 | }}} |
| 105 | |
| 106 | == Using Markdown or !RestructuredText |
| 107 | |
| 108 | Using code blocks like before, Trac can render other markup formats |
| 109 | {{{ |
| 110 | {{{#!Markdown |
| 111 | # heading 1 |
| 112 | ## heading 2 |
| 113 | ### heading 3 |
| 114 | }}} |
| 115 | }}} |
| 116 | |
| 117 | |
| 118 | |
| 119 | |
| 120 | |