9c6634cfec
Added ordered list tests
2025-05-20 16:42:40 -04:00
2a5a68b1de
Fixed test name
2025-05-20 16:42:12 -04:00
f8e1a98bdf
Remove obsolete comment
2025-05-20 14:03:30 -04:00
05433c31f1
Remove unused functions
2025-05-20 14:02:50 -04:00
5c871f2b25
Removed test file
2025-05-20 12:25:07 -05:00
5273c99e6e
Added unordered list tests and integration tests; added strikethrough
...
tests to test list
2025-05-20 12:24:20 -05:00
50888c9c3d
Added bold and strikethrough tests
2025-05-20 12:23:47 -05:00
45115c765c
An unordered list must end in a blank line.
2025-05-20 12:23:27 -05:00
5b0d42fd2d
Use the in-order parsing approach instead of the post-order one.
2025-05-20 12:23:13 -05:00
2a585d00f2
Enforce at least one space between list indicator and list text.
2025-05-20 12:22:37 -05:00
11a3b14cb1
Define a parser for list line tokens, update line token parser
2025-05-20 12:22:19 -05:00
58d3142855
Update comment
2025-05-20 12:21:45 -05:00
0fb651fffc
Add parseUnit instead of parseString to lineParsers
2025-05-20 12:20:51 -05:00
bc05dede06
Create a list of parsers that are used for list line items.
2025-05-20 12:20:35 -05:00
b69e34f823
Parse a single character as a unit
2025-05-20 12:20:10 -05:00
2514ecdafc
Parse bold, italic and strikethrough in-order, instead of trying to find
...
the end, then parsing everything in the middle.
The current approach parses the opening bold (or italic), some text,
then the closing bold (or italic), instead of parsing the opening,
closing, then everything in between.
2025-05-20 12:19:59 -05:00
c52d5556a2
Allow for multiple blank lines after header
2025-05-20 12:18:52 -05:00
5fc1b1122a
Create a function to 'fallthrough parse' ie. try the second parser only
...
if the first one fails.
2025-05-20 12:18:23 -05:00
83dd0024c4
Space doesn't have to be a reserved character anymore.
2025-05-20 12:17:59 -05:00
70761649ad
Derive Eq for defined types
2025-05-20 12:17:43 -05:00
b9c6cc4470
Implemented strikethrough parser
2025-05-16 19:29:39 -05:00
23691f9cfe
Add strikethrough parser to line parser list
2025-05-16 19:28:41 -05:00
8c220cc800
A document can consist of unordered lists as well
2025-05-14 21:40:03 -05:00
ee453c0259
Fixed blockquote parser; implemented unordered list parser and relevant
...
sub-parsers
2025-05-14 21:39:27 -05:00
c90d23617a
A blockquote must have a list of tokens
2025-05-14 21:38:50 -05:00
c574699a8a
Added an import
2025-05-14 21:38:38 -05:00
f55e160e25
Added tests for unordered lists
2025-05-14 21:37:58 -05:00
dddcca0185
Wrote a lot of helper functions - most importantly greedyParse
2025-05-13 21:40:42 -05:00
e7d94f225a
Updated show definitions for some tokens; add HTML syntax
2025-05-09 23:14:09 -05:00
e8eb22f3ae
Added pragmas to suppress LSP warnings; removed a random line that was
...
added by the LSP
2025-05-09 23:13:31 -05:00
ef1809970b
Greatly shortened parseQuotedLine, because I can just use greedyParse
...
instead of using manyTill
2025-05-09 23:12:53 -05:00
549504d650
Consume whitespace between greater-than sign and text in a blockquote
...
line
2025-05-09 23:12:12 -05:00
4f23592aeb
Add relevant modules to other-modules section, to get rid of cabal's
...
warnings
2025-05-09 23:10:34 -05:00
b00d79b9aa
Renamed Test.hs to MdToHtmlTest.hs so that the filename matches the
...
module name; updated blockquote tests; started working on ordered list
tests
2025-05-09 23:10:04 -05:00
3cd9f24935
Wrote helper functions for parseBlockquote, to parse a quoted line and
...
multiple quoted lines.
2025-05-09 16:12:09 -05:00
a60b3754e4
Rewrite leftmostLongest and leftmostLongestParse so that they don't rely
...
on 'head' which is a partial function
2025-05-09 12:17:53 -05:00
3330185393
Make MdToken a Semigroup and a Monoid, so that I can use 'mempty' for
...
it.
2025-05-09 12:17:22 -05:00
1df7f64aec
Started working on blockquote parser
2025-05-08 17:54:00 -05:00
bfd627c763
Added blockquote tests
2025-05-08 17:53:37 -05:00
81671727b2
Added more parsers for escaped characters and links.
2025-05-07 14:21:13 -05:00
1b821c4315
Declare separate variable for escaped characters.
2025-05-07 14:20:51 -05:00
51728dd3a1
Added double-quotes to link URL when printing link.
2025-05-07 14:20:29 -05:00
56e1514213
Added more tests
2025-05-07 14:19:50 -05:00
e7ea7b6ba6
Removed unecessary case statement
2025-05-06 17:10:54 -05:00
ef132791a1
Applied lots of hints, mostly redundant brackets
2025-05-06 17:09:54 -05:00
ca0d09dfab
Added another test
2025-05-06 17:07:46 -05:00
d1b0ce6b10
Move parseHeader up in the chain - parseDocument can either parse
...
headers or a paragraph
2025-05-06 17:06:22 -05:00
b6f51c33c7
Parse until EOF instead of adding a manual check.
2025-05-06 17:05:19 -05:00
9ffbb7365c
Removed commented line
2025-05-06 17:05:02 -05:00
71aacdd26a
Removed unecessary parentheses
2025-05-06 17:04:24 -05:00