1module IncludeFilePlugin (transform) where
3import Text.Pandoc.Shared
6-- This plugin allows you to include the contents of an
7-- external file in a delimited code block like this:
9-- ~~~ {include="filename"}
12-- Trailing newlines are trimmed.
14transform :: Block -> IO Block
15transform cb@(CodeBlock (id, classes, namevals) contents) =
16 case lookup "include" namevals of
17 Just f -> return . (CodeBlock (id, classes, namevals) . stripTrailingNewlines) =<< readFile f
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list