Add highlight directive to the rST reader (#6140)

This commit is contained in:
Lucas Escot
2020-02-13 19:27:34 +01:00
committed by GitHub
parent 3a181f0a97
commit 29c2670da2
4 changed files with 41 additions and 4 deletions
+24
View File
@@ -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
=====