cagix / pandoc-lecture

Pandoc Markdown Lecture Template: This project defines a skeleton repo for creating lecture slides and handouts including lecture notes out of Pandoc Markdown (https://pandoc.org/MANUAL.html) using a single source approach.
MIT License
97 stars 18 forks source link

Filter: remove attributes from code blocks (hugo) #168

Closed cagix closed 1 year ago

cagix commented 1 year ago

In order to get proper syntax highlighting when using Hugo,


Examples:

``` {.haskell size="tiny"}
class Monad m where
    (>>=) :: m a -> (a -> m b) -> m b
    return :: a -> m a
```

and

`void`{.c}

would not be recognised by Hugo. Thus this PR introduces some preprocessing and the hugo.lua filter will emit

``` haskell
class Monad m where
    (>>=) :: m a -> (a -> m b) -> m b
    return :: a -> m a
```

and

`void`

fixes #83