nitiwiki: extends the example with an external highlighter
[nit.git] / contrib / nitiwiki / examples / nitiwiki / pages / block.md
diff --git a/contrib/nitiwiki/examples/nitiwiki/pages/block.md b/contrib/nitiwiki/examples/nitiwiki/pages/block.md
new file mode 100644 (file)
index 0000000..d0daaba
--- /dev/null
@@ -0,0 +1,36 @@
+# Test of code highlighting
+
+A basic block.
+
+    print(["hello", "world"].join(", "))
+
+A fenced block.
+
+~~~
+print(["hello", "world"].join(", "))
+~~~
+
+A fenced block with metainfo, so it can be highlighted with an external tool.
+
+~~~html
+<table class="hello"><tr>
+<td>Hello</td>
+<td>World</td>
+</tr></table>
+~~~
+
+A special block where the rendering is delegated to pandoc.
+For instance, to render tables.
+
+~~~pandoc
+what     how
+------ -----
+hello     10
+world   9001
+~~~
+
+This try some exploit
+~~~raw'"; echo pwned >&2 #
+Hello<br/>
+World
+~~~