Undo everything to switch over to an event based parser

This commit is contained in:
Nathan McCarty 2025-02-23 17:12:19 -05:00
parent 7ef90867f2
commit 81a7f09623
25 changed files with 1 additions and 1414 deletions

View file

@ -1,16 +0,0 @@
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

View file

@ -1,26 +0,0 @@
<!DOCTYPE HTML>
<html lang=en>
<body>
<p>A paragraph with a normal newline in the middle of it</p>
<p>
A paragraph with a hard line break
<br>
in the middle of it
</p>
<p>
A paragraph with a hard line break
<br>
in the middle of it with extra spaces
</p>
<p>
A paragraph with a hard line break
<br>
in the middle of it with no spaces
</p>
<p>A paragraph with an explicit soft line break in the middle of it</p>
<p>Multiple soft breaks should coalesce into one</p>
<p>Same should apply when mixing explicit and implied soft breaks</p>
<p>An escaped space&nbsp;should render as a nonbreaking space</p>
<p>We also want to test&nbsp;&nbsp;multiple&nbsp;&nbsp;&nbsp;nonbreaking&nbsp;&nbsp;&nbsp;&nbsp;spaces&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;in a row</p>
</body>
</html>

View file

@ -1,6 +0,0 @@
rm -rf build/
flock "$1" pack -q install-deps test.ipkg
pack -q run test.ipkg
rm -rf build/

View file

@ -1,22 +0,0 @@
A paragraph with a normal newline
in the middle of it
A paragraph with a hard line break \
in the middle of it
A paragraph with a hard line break \
in the middle of it with extra spaces
A paragraph with a hard line break \
in the middle of it with no spaces
A paragraph with an explicit soft line break \n in the middle of it
Multiple soft breaks should coalesce \n\n\n into one
Same should apply when mixing explicit \n
and implied soft breaks
An escaped space\ should render as a nonbreaking space
We also want to test\ \ multiple\ \ \ nonbreaking\ \ \ \ spaces\ \ \ \ \ in a row

View file

@ -1,7 +0,0 @@
package a-test
depends = SSG
main = Main
executable = test

View file

@ -1,16 +0,0 @@
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

View file

@ -1,29 +0,0 @@
<!DOCTYPE HTML>
<html lang=en>
<body>
<h1>Level 1 Heading</h1>
<h2>Level 2 Heading</h2>
<h3>Level 3 Heading</h3>
<h4>Level 4 Heading</h4>
<h5>Level 5 Heading</h5>
<h6>Level 6 Heading</h6>
<p>####### Level 7 Not a Heading</p>
<p># A heading that spans multiple lines</p>
<p># Heading</p>
<p>Some content</p>
<p>## A sub heading</p>
<p>Even more content</p>
<p># Back up</p>
<p>Some final content</p>
<h1>A Multiline Heading</h1>
<p>## A Level 2 ## Multiline Heading</p>
<h2>Heading</h2>
<p>### Not a heading</p>
<h3>Heading</h3>
<h2>Not a heading</h2>
<h1>A Multiline Heading</h1>
<h2>A Level 2 Multiline Heading</h2>
<h1>A Multiline Heading</h1>
<h2>A Level 2 Multiline Heading</h2>
</body>
</html>

View file

@ -1,6 +0,0 @@
rm -rf build/
flock "$1" pack -q install-deps test.ipkg
pack -q run test.ipkg
rm -rf build/

View file

@ -1,52 +0,0 @@
# 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
# A Multiline
# Heading
## A Level 2
## Multiline Heading
## Heading
### Not a heading
### Heading
## Not a heading
# A Multiline
Heading
## A Level 2
Multiline Heading
# A Multiline
Heading
## A Level 2
Multiline Heading

View file

@ -1,7 +0,0 @@
package a-test
depends = SSG
main = Main
executable = test

View file

@ -1,16 +0,0 @@
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

View file

@ -1,22 +0,0 @@
<!DOCTYPE HTML>
<html lang=en>
<body>
<blockquote>
<p>A single line block quote</p>
</blockquote>
<blockquote>
<p>This is a multi-line blockquote With no linebreaks</p>
</blockquote>
<blockquote>
<p>This is a multi-line block quote with</p>
<p>A line break</p>
</blockquote>
<blockquote>
<p>
This is a block quote with a
<br>
hard break in it
</p>
</blockquote>
</body>
</html>

View file

@ -1,6 +0,0 @@
rm -rf build/
flock "$1" pack -q install-deps test.ipkg
pack -q run test.ipkg
rm -rf build/

View file

@ -1,11 +0,0 @@
> A single line block quote
> This is a multi-line blockquote
> With no linebreaks
> This is a multi-line block quote with
>
> A line break
> This is a block quote with a \
> hard break in it

View file

@ -1,7 +0,0 @@
package a-test
depends = SSG
main = Main
executable = test