diff --git a/test/djot-to-html/003-headings/Main.idr b/test/djot-to-html/003-headings/Main.idr new file mode 100644 index 0000000..97d8771 --- /dev/null +++ b/test/djot-to-html/003-headings/Main.idr @@ -0,0 +1,16 @@ +module Main + +import SSG.Djot +import SSG.HTML + +import System +import System.File + +main : IO () +main = do + Right contents <- readFile "test.dj" + | Left err => do + printLn err + exitFailure + let parsed = djot contents + putStr . render . renderHtml $ parsed diff --git a/test/djot-to-html/003-headings/expected b/test/djot-to-html/003-headings/expected new file mode 100644 index 0000000..f281872 --- /dev/null +++ b/test/djot-to-html/003-headings/expected @@ -0,0 +1,19 @@ + + +
+####### Level 7 Not a Heading
+Some content
+Even more content
+Some final content
+ + \ No newline at end of file diff --git a/test/djot-to-html/003-headings/run b/test/djot-to-html/003-headings/run new file mode 100644 index 0000000..6b5ab53 --- /dev/null +++ b/test/djot-to-html/003-headings/run @@ -0,0 +1,6 @@ +rm -rf build/ + +flock "$1" pack -q install-deps test.ipkg +pack -q run test.ipkg + +rm -rf build/ diff --git a/test/djot-to-html/003-headings/test.dj b/test/djot-to-html/003-headings/test.dj new file mode 100644 index 0000000..e43c08b --- /dev/null +++ b/test/djot-to-html/003-headings/test.dj @@ -0,0 +1,28 @@ +# Level 1 Heading + +## Level 2 Heading + +### Level 3 Heading + +#### Level 4 Heading + +##### Level 5 Heading + +###### Level 6 Heading + +####### Level 7 Not a Heading + +# A heading that +spans multiple lines + +# Heading + +Some content + +## A sub heading + +Even more content + +# Back up + +Some final content diff --git a/test/djot-to-html/003-headings/test.ipkg b/test/djot-to-html/003-headings/test.ipkg new file mode 100644 index 0000000..0efef9e --- /dev/null +++ b/test/djot-to-html/003-headings/test.ipkg @@ -0,0 +1,7 @@ +package a-test + +depends = SSG + +main = Main + +executable = test