aboutsummaryrefslogtreecommitdiff
path: root/test/rst-reader.rst
diff options
context:
space:
mode:
authorLucas Escot <flupe@users.noreply.github.com>2020-02-13 19:27:34 +0100
committerGitHub <noreply@github.com>2020-02-13 10:27:34 -0800
commit29c2670da2a267094148f3edacaed5fc258bcdd1 (patch)
tree667643a6a8d73033f8480f5dd8417cc7476a6a31 /test/rst-reader.rst
parent3a181f0a978cb838615b86ffbc705255d92fdf66 (diff)
downloadpandoc-29c2670da2a267094148f3edacaed5fc258bcdd1.tar.gz
Add highlight directive to the rST reader (#6140)
Diffstat (limited to 'test/rst-reader.rst')
-rw-r--r--test/rst-reader.rst24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/rst-reader.rst b/test/rst-reader.rst
index a918c0e2c..d2d82d435 100644
--- a/test/rst-reader.rst
+++ b/test/rst-reader.rst
@@ -107,6 +107,30 @@ And:
def my_function(x):
return x + 1
+If we use the highlight directive, we can specify a default language
+for literate blocks.
+
+.. highlight:: haskell
+
+::
+
+ -- this code is in haskell
+ data Tree = Leaf | Node Tree Tree
+
+::
+
+ -- this code is in haskell too
+ data Nat = Zero | Succ Nat
+
+.. highlight:: javascript
+
+::
+
+ -- this code is in javascript
+ let f = (x, y) => x + y
+
+.. highlight::
+
Lists
=====