This website works better with JavaScript.
7d45b1123f
Renamed md-to-html-runner to mdtoh
usingMegaparsec
Aadhavan Srinivasan
2025-06-18 15:21:54 -0400
9627abcd12
Updated test
Aadhavan Srinivasan
2025-06-10 14:14:56 -0400
82277e9ea8
Only add newlines for linebreak when pretty printing
Aadhavan Srinivasan
2025-06-10 14:14:26 -0400
d074b0131c
Parse linebreaks as a backslash before a newline
Aadhavan Srinivasan
2025-06-10 14:10:45 -0400
57cb3e68fa
Import module for word wrapping; add package to cabal file
Aadhavan Srinivasan
2025-06-10 14:02:20 -0400
4e9f84c2bb
Add function to pretty print; commented out my word wrap and use a built-in one instead
Aadhavan Srinivasan
2025-06-10 14:01:52 -0400
e025614324
Print extra newline if output text doesn't include a newline
Aadhavan Srinivasan
2025-06-10 09:13:40 -0400
e711444066
Add more packages to cabal file
Aadhavan Srinivasan
2025-06-10 09:13:15 -0400
6b99a1835d
Created a separate parser list for all parsers (except the unit parser is replaced with the non-newline unit parser); use that parser when parsing list lines
Aadhavan Srinivasan
2025-06-10 09:12:42 -0400
04167e0f96
Parse CSS classes in image and figure
Aadhavan Srinivasan
2025-06-10 09:11:56 -0400
0528e813c5
Parser for CSS classes
Aadhavan Srinivasan
2025-06-10 09:11:34 -0400
b1b99189c9
Link tect can be empty; inline code cannot be empty and can have nested backticks; created a unit parser for all characters except newline
Aadhavan Srinivasan
2025-06-10 09:11:19 -0400
ade3768e29
Try and backtrack
Aadhavan Srinivasan
2025-06-10 09:10:10 -0400
fd6d39ecd6
Parse space at beginning of list
Aadhavan Srinivasan
2025-06-10 09:09:53 -0400
0f04342867
More trying and backtracking; parse and discard extraneous spaces at beginning of list
Aadhavan Srinivasan
2025-06-10 09:09:31 -0400
80ef93bbc9
Try parsing an ordered list item, backtrack if not possible
Aadhavan Srinivasan
2025-06-10 09:08:52 -0400
b73d4131b6
Added support for tables and codeblocks
Aadhavan Srinivasan
2025-06-10 09:08:30 -0400
c48b8c5ae8
Images and figures now support CSS classes
Aadhavan Srinivasan
2025-06-10 09:05:31 -0400
cf4282b26e
More imports
Aadhavan Srinivasan
2025-06-10 09:04:28 -0400
7b40d6fe7c
Imports
Aadhavan Srinivasan
2025-06-10 09:04:18 -0400
c4255d4578
Added a test for a list with just one item
Aadhavan Srinivasan
2025-06-10 09:04:02 -0400
dcbbff13cb
Spacing change
Aadhavan Srinivasan
2025-06-10 09:03:48 -0400
592fad2b46
Added tests for tables
Aadhavan Srinivasan
2025-06-10 09:03:32 -0400
b8ba27f240
Strip newlines when comparing in test
Aadhavan Srinivasan
2025-06-03 15:37:27 -0400
bb08b40512
Replaced nested bold with asterisks, with asterisks and underscores
Aadhavan Srinivasan
2025-06-03 15:37:12 -0400
93548a4533
Never mind, doesn't seem to work well
Aadhavan Srinivasan
2025-06-03 15:31:13 -0400
160cb0edeb
Trying to get nested bold and italic to work
Aadhavan Srinivasan
2025-06-03 15:30:35 -0400
2893fa25e6
Include new packages
Aadhavan Srinivasan
2025-06-03 11:20:02 -0400
324e5da82d
Use new definition for lefmostLongestParse
Aadhavan Srinivasan
2025-06-03 11:19:42 -0400
05e5548aa9
Huge rewrite - use megaparsec instead of readP
Aadhavan Srinivasan
2025-06-03 11:19:05 -0400
1915628a2b
Used 'in-order' parsing for headers, instead of leftmostLongestParse
Aadhavan Srinivasan
2025-05-27 14:12:13 -0400
1d9ac86a2a
Implementation and test for horizontal rule
master
Aadhavan Srinivasan
2025-05-27 13:41:38 -0400
0320402957
Fixed how trailing newlines are parsed
Aadhavan Srinivasan
2025-05-27 09:28:19 -0400
8696a185a7
Rewrote readLines function to be more concise
Aadhavan Srinivasan
2025-05-27 08:55:10 -0400
da38ac226f
Added figure implementation and tests
Aadhavan Srinivasan
2025-05-27 08:54:52 -0400
1fcce32ef6
Updated to read from stdin/file
Aadhavan Srinivasan
2025-05-23 19:03:23 -0400
e50081614a
Removed section from cabal file
Aadhavan Srinivasan
2025-05-23 19:03:14 -0400
b98a8cc44f
Added image tests
Aadhavan Srinivasan
2025-05-23 14:55:58 -0400
90c7a585d2
Added image parser
Aadhavan Srinivasan
2025-05-23 14:04:37 -0400
4a15330874
Updated showing of image
Aadhavan Srinivasan
2025-05-23 14:04:21 -0400
c14112d3e4
Updated special and escapable characters
Aadhavan Srinivasan
2025-05-23 14:04:05 -0400
09982f4ab1
Made some changes
fixingIncompleteElements
Aadhavan Srinivasan
2025-05-23 08:07:02 -0400
4101767aff
Merge remote-tracking branch 'origin' into fixingIncompleteElements
Aadhavan Srinivasan
2025-05-20 22:24:24 -0400
ed7d2c1ef1
Added code parser to list line parser list
Aadhavan Srinivasan
2025-05-20 22:23:41 -0400
234145bcb3
Started working on parsing changes to allow incomplete elements to be parsed (eg. opening bold, followed by text, without closing bold)
Aadhavan Srinivasan
2025-05-20 22:21:59 -0400
eb20f154a4
Removed unused function
Aadhavan Srinivasan
2025-05-20 22:20:36 -0400
172985131b
Fixed HTML rendering for horizontal rule
Aadhavan Srinivasan
2025-05-20 22:20:23 -0400
3781e67ab1
Created a separate list of escapable chars
Aadhavan Srinivasan
2025-05-20 22:20:05 -0400
f2d54edd3f
Implemented inline code parsing
Aadhavan Srinivasan
2025-05-20 22:19:44 -0400
5393dc4eb9
Added code tests
Aadhavan Srinivasan
2025-05-20 22:18:37 -0400
e051c87f08
Factor list line common parsing into a separate function; refactored OList and UList line parsing to us it
Aadhavan Srinivasan
2025-05-20 16:48:31 -0400
9b1c51897c
A nested list can be ordered or unordered
Aadhavan Srinivasan
2025-05-20 16:47:58 -0400
2a3dddc7b0
Rename function
Aadhavan Srinivasan
2025-05-20 16:47:31 -0400
a8793b5adb
Remove obsolete comments
Aadhavan Srinivasan
2025-05-20 16:47:16 -0400
eecec764ad
A list can contain a blockquote as well.
Aadhavan Srinivasan
2025-05-20 16:47:04 -0400
cdca6ea95e
A list item doesn't need to have a nested list item parser, because the line item parser handles the nested list.
Aadhavan Srinivasan
2025-05-20 16:46:52 -0400
540b5430e5
Use list of document parsers in parseDocument
Aadhavan Srinivasan
2025-05-20 16:45:56 -0400
00dfba81eb
Created a list of document parsers; implemented ordered list parsing.
Aadhavan Srinivasan
2025-05-20 16:45:37 -0400
39152c0034
Factor out common code for UList and OList parsing into a separate function. Refactored UList function; wrote OList function.
Aadhavan Srinivasan
2025-05-20 16:45:07 -0400
41b35be7c9
Rename function
Aadhavan Srinivasan
2025-05-20 16:43:35 -0400
d2c8565f62
Import Data.Char for isDigit
Aadhavan Srinivasan
2025-05-20 16:43:22 -0400
62eeef2abb
Removed unused functions
Aadhavan Srinivasan
2025-05-20 16:43:10 -0400
9c6634cfec
Added ordered list tests
Aadhavan Srinivasan
2025-05-20 16:42:40 -0400
2a5a68b1de
Fixed test name
Aadhavan Srinivasan
2025-05-20 16:42:12 -0400
f8e1a98bdf
Remove obsolete comment
Aadhavan Srinivasan
2025-05-20 14:03:30 -0400
05433c31f1
Remove unused functions
Aadhavan Srinivasan
2025-05-20 14:02:50 -0400
5c871f2b25
Removed test file
Aadhavan Srinivasan
2025-05-20 12:25:07 -0500
5273c99e6e
Added unordered list tests and integration tests; added strikethrough tests to test list
Aadhavan Srinivasan
2025-05-20 12:24:20 -0500
50888c9c3d
Added bold and strikethrough tests
Aadhavan Srinivasan
2025-05-20 12:23:47 -0500
45115c765c
An unordered list must end in a blank line.
Aadhavan Srinivasan
2025-05-20 12:23:27 -0500
5b0d42fd2d
Use the in-order parsing approach instead of the post-order one.
Aadhavan Srinivasan
2025-05-20 12:23:13 -0500
2a585d00f2
Enforce at least one space between list indicator and list text.
Aadhavan Srinivasan
2025-05-20 12:22:37 -0500
11a3b14cb1
Define a parser for list line tokens, update line token parser
Aadhavan Srinivasan
2025-05-20 12:22:19 -0500
58d3142855
Update comment
Aadhavan Srinivasan
2025-05-20 12:21:45 -0500
0fb651fffc
Add parseUnit instead of parseString to lineParsers
Aadhavan Srinivasan
2025-05-20 12:20:51 -0500
bc05dede06
Create a list of parsers that are used for list line items.
Aadhavan Srinivasan
2025-05-20 12:20:35 -0500
b69e34f823
Parse a single character as a unit
Aadhavan Srinivasan
2025-05-20 12:20:10 -0500
2514ecdafc
Parse bold, italic and strikethrough in-order, instead of trying to find the end, then parsing everything in the middle.
Aadhavan Srinivasan
2025-05-20 12:19:59 -0500
c52d5556a2
Allow for multiple blank lines after header
Aadhavan Srinivasan
2025-05-20 12:18:52 -0500
5fc1b1122a
Create a function to 'fallthrough parse' ie. try the second parser only if the first one fails.
Aadhavan Srinivasan
2025-05-20 12:18:23 -0500
83dd0024c4
Space doesn't have to be a reserved character anymore.
Aadhavan Srinivasan
2025-05-20 12:17:59 -0500
70761649ad
Derive Eq for defined types
Aadhavan Srinivasan
2025-05-20 12:17:43 -0500
b9c6cc4470
Implemented strikethrough parser
Aadhavan Srinivasan
2025-05-16 19:29:39 -0500
23691f9cfe
Add strikethrough parser to line parser list
Aadhavan Srinivasan
2025-05-16 19:28:41 -0500
8c220cc800
A document can consist of unordered lists as well
Aadhavan Srinivasan
2025-05-14 21:40:03 -0500
ee453c0259
Fixed blockquote parser; implemented unordered list parser and relevant sub-parsers
Aadhavan Srinivasan
2025-05-14 21:39:27 -0500
c90d23617a
A blockquote must have a list of tokens
Aadhavan Srinivasan
2025-05-14 21:38:50 -0500
c574699a8a
Added an import
Aadhavan Srinivasan
2025-05-14 21:38:38 -0500
f55e160e25
Added tests for unordered lists
Aadhavan Srinivasan
2025-05-14 21:37:58 -0500
dddcca0185
Wrote a lot of helper functions - most importantly greedyParse
Aadhavan Srinivasan
2025-05-13 21:40:42 -0500
e7d94f225a
Updated show definitions for some tokens; add HTML syntax
Aadhavan Srinivasan
2025-05-09 23:14:09 -0500
e8eb22f3ae
Added pragmas to suppress LSP warnings; removed a random line that was added by the LSP
Aadhavan Srinivasan
2025-05-09 23:13:31 -0500
ef1809970b
Greatly shortened parseQuotedLine, because I can just use greedyParse instead of using manyTill
Aadhavan Srinivasan
2025-05-09 23:12:53 -0500
549504d650
Consume whitespace between greater-than sign and text in a blockquote line
Aadhavan Srinivasan
2025-05-09 23:12:12 -0500
4f23592aeb
Add relevant modules to other-modules section, to get rid of cabal's warnings
Aadhavan Srinivasan
2025-05-09 23:10:34 -0500
b00d79b9aa
Renamed Test.hs to MdToHtmlTest.hs so that the filename matches the module name; updated blockquote tests; started working on ordered list tests
Aadhavan Srinivasan
2025-05-09 23:10:04 -0500
3cd9f24935
Wrote helper functions for parseBlockquote, to parse a quoted line and multiple quoted lines.
Aadhavan Srinivasan
2025-05-09 16:12:09 -0500
a60b3754e4
Rewrite leftmostLongest and leftmostLongestParse so that they don't rely on 'head' which is a partial function
Aadhavan Srinivasan
2025-05-09 12:17:53 -0500
3330185393
Make MdToken a Semigroup and a Monoid, so that I can use 'mempty' for it.
Aadhavan Srinivasan
2025-05-09 12:17:22 -0500
1df7f64aec
Started working on blockquote parser
Aadhavan Srinivasan
2025-05-08 17:54:00 -0500