mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-28 17:20:47 +08:00
Add highlight directive to the rST reader (#6140)
This commit is contained in:
@@ -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
|
||||
=====
|
||||
|
||||
|
||||
Reference in New Issue
Block a user