need include for div
This commit is contained in:
parent
887ff7b069
commit
8e8ac86037
@ -1,7 +1,6 @@
|
||||
#!/usr/bin/env runhaskell
|
||||
-- filter.hs
|
||||
import Text.Pandoc.JSON
|
||||
( Block(CodeBlock), ToJSONFilter(toJSONFilter) )
|
||||
import qualified Data.Text.IO as TIO
|
||||
import qualified Data.Text as T
|
||||
|
||||
|
18
input.md
18
input.md
@ -1,5 +1,17 @@
|
||||
Here's the pandoc README:
|
||||
|
||||
~~~~ {include="input.md"}
|
||||
this will be replaced by contents of README
|
||||
~~~~
|
||||
:::{include="filter.hs"}
|
||||
:::
|
||||
|
||||
|
||||
::: Theorem
|
||||
test thm1
|
||||
:::
|
||||
|
||||
:::{.Theorem #thm2}
|
||||
test thm2
|
||||
:::
|
||||
|
||||
:::{class="Theorem" id="thm3"}
|
||||
test thm3
|
||||
:::
|
5
makefile
5
makefile
@ -1,5 +1,8 @@
|
||||
|
||||
.PHONY: filter showAST
|
||||
.PHONY: filter showAST nofilter
|
||||
|
||||
nofilter:
|
||||
pandoc -fmarkdown -thtml input.md > output.html
|
||||
|
||||
filter:
|
||||
pandoc -fmarkdown -thtml input.md --filter ./filter.hs > output.html
|
||||
|
15
output.html
15
output.html
@ -1,6 +1,13 @@
|
||||
<p>Here’s the pandoc README:</p>
|
||||
<pre data-include="input.md"><code>Here's the pandoc README:
|
||||
<div data-include="filter.hs">
|
||||
|
||||
~~~~ {include="input.md"}
|
||||
this will be replaced by contents of README
|
||||
~~~~</code></pre>
|
||||
</div>
|
||||
<div class="Theorem">
|
||||
<p>test thm1</p>
|
||||
</div>
|
||||
<div id="thm2" class="Theorem">
|
||||
<p>test thm2</p>
|
||||
</div>
|
||||
<div id="thm3" class="Theorem">
|
||||
<p>test thm3</p>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user