From 8e8ac86037e575f62e3178be21afe7570dd38125 Mon Sep 17 00:00:00 2001 From: Yu Cong Date: Sun, 20 Apr 2025 21:27:40 +0800 Subject: [PATCH] need include for div --- filter.hs | 1 - input.md | 18 +++++++++++++++--- makefile | 5 ++++- output.html | 15 +++++++++++---- 4 files changed, 30 insertions(+), 9 deletions(-) diff --git a/filter.hs b/filter.hs index 0c9d6f6..d235966 100755 --- a/filter.hs +++ b/filter.hs @@ -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 diff --git a/input.md b/input.md index 23a10df..2b8be09 100644 --- a/input.md +++ b/input.md @@ -1,5 +1,17 @@ Here's the pandoc README: -~~~~ {include="input.md"} -this will be replaced by contents of README -~~~~ \ No newline at end of file +:::{include="filter.hs"} +::: + + +::: Theorem +test thm1 +::: + +:::{.Theorem #thm2} +test thm2 +::: + +:::{class="Theorem" id="thm3"} +test thm3 +::: \ No newline at end of file diff --git a/makefile b/makefile index 2d78466..f963373 100644 --- a/makefile +++ b/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 diff --git a/output.html b/output.html index c6b66e7..9487283 100644 --- a/output.html +++ b/output.html @@ -1,6 +1,13 @@

Here’s the pandoc README:

-
Here's the pandoc README:
+
-~~~~ {include="input.md"} -this will be replaced by contents of README -~~~~
+ +
+

test thm1

+
+
+

test thm2

+
+
+

test thm3

+