Commit Graph

41 Commits

Author SHA1 Message Date
Tom Alexander
0ca6ce504f
Simulate trailing whitespace in empty greater blocks just like drawers. 2023-04-22 21:45:18 -04:00
Tom Alexander
9861084afe
Cleanup. 2023-04-22 01:45:38 -04:00
Tom Alexander
ba74bb58bb
Separate out calls to build element parser. 2023-04-22 01:08:45 -04:00
Tom Alexander
4ac6d89311
Moving towards unifying into a single parameterized element matcher.
This is to give paragraph priority over keyword in parsing so that affiliated keywords for paragraphs will be parsed as such.
2023-04-22 00:55:31 -04:00
Tom Alexander
9b66929c14
Update test to use elements to capture the trailing whitespace. 2023-04-22 00:14:41 -04:00
Tom Alexander
0b989b53a6
Fix warnings. 2023-04-21 23:55:18 -04:00
Tom Alexander
e97cf6630f
Move consuming the trailing whitespace up to the element matchers. 2023-04-21 23:54:54 -04:00
Tom Alexander
18323a2b43
Solve the rest of the compiler warnings. 2023-04-21 18:42:31 -04:00
Tom Alexander
a1724dae52
Combine the error types. 2023-04-21 18:36:01 -04:00
Tom Alexander
d780981baf
Separate out the element parsers. 2023-04-21 16:10:56 -04:00
Tom Alexander
54b02f4e74
Give object structs their own file separate from the parsers. 2023-04-21 16:07:38 -04:00
Tom Alexander
400e253cf1
Don't give paragraph a context since it just contains objects. 2023-04-18 22:18:21 -04:00
Tom Alexander
45d0ce17c3
Do not allow elements to immediately nest inside themselves.
Plain list is omitted because they can nest.
2023-04-18 22:10:44 -04:00
Tom Alexander
a2051aca4f
Remove ChainBehavior. 2023-04-18 20:44:58 -04:00
Tom Alexander
35eff51d1b
First implementation moving over to the new exit matcher class system. 2023-04-18 20:33:01 -04:00
Tom Alexander
1ecdd61fed
Do not consume trailing whitespace if the parent exit matcher is matching. 2023-04-10 13:13:11 -04:00
Tom Alexander
6fdd613bed
Cleanup. 2023-04-10 12:13:31 -04:00
Tom Alexander
e5bc4cb14b
Footnote definitions are parsing on their own. 2023-04-10 11:50:43 -04:00
Tom Alexander
45db182421
Add comment about why we are not checking the parent exit matcher in paragraph. 2023-04-10 11:34:29 -04:00
Tom Alexander
df9265c2af
Updated paragraph to handle the new consumption of trailing whitespace. 2023-04-10 11:29:14 -04:00
Tom Alexander
e417e86bd4
Add a simple test for paragraphs. 2023-04-10 11:24:04 -04:00
Tom Alexander
11f127b545
Minor cleanup. 2023-04-03 17:25:30 -04:00
Tom Alexander
b5b335b9b0
Fix handling of whitespace at the end of paragraphs and mandatory whitespace in list items. 2023-04-03 16:30:58 -04:00
Tom Alexander
2d1df18544
Cleanup. 2023-04-03 15:15:16 -04:00
Tom Alexander
2b0e88dc01
The current problem is plain_list_item_end is not taking into account depth. 2023-03-31 13:08:53 -04:00
Tom Alexander
68156f3667
Consume line break at the end of paragraph. 2023-03-31 11:42:04 -04:00
Tom Alexander
707eac5bf8
Move trailing whitespace parsing to a separate element.
I still need to parse the line break at the end of elements.
2023-03-31 11:16:37 -04:00
Tom Alexander
3643f91bac
The current problem is whitespace at the end of a list item should not be consumed. 2023-03-27 18:50:25 -04:00
Tom Alexander
2c7a559869
Fix the line break consumption issue.
This leaves us with an issue of lists becoming needlessly nested.
2023-03-27 18:10:14 -04:00
Tom Alexander
028946ec90
Identified the problem.
The issue is plain text is eating the line break so paragraph is failing since it expects a line break at the end.
2023-03-27 18:08:17 -04:00
Tom Alexander
22a2ed29f1
Integrate plain list parser into the parser tree. 2023-03-27 13:06:41 -04:00
Tom Alexander
74fc440cbd
Move parsers for specific objects/elements to their own files.
The parsers are the most complicated part, so I want them in their own files. I am uncertain if I want to move their corresponding structs or just the parsers.
2023-03-25 12:53:57 -04:00
Tom Alexander
5d9771c3b6
Move old modules out of the src tree. 2023-03-25 12:25:05 -04:00
Tom Alexander
32897270a5
Support leading whitespace for list items. 2023-03-18 13:26:32 -04:00
Tom Alexander
f39319702c
Switch to nom's consumed. 2022-12-18 07:52:01 -05:00
Tom Alexander
448dcfac72
Create an also_recognize combinator to make providing source slices fast and safe. 2022-12-18 04:36:12 -05:00
Tom Alexander
50a67c65ef
Standardize order of lifetimes for r and s. 2022-12-18 03:30:36 -05:00
Tom Alexander
2def475337
Move the structs into the token module. 2022-12-18 03:24:35 -05:00
Tom Alexander
4ac3a47deb
Move the text element parser into the text module. 2022-12-18 03:15:11 -05:00
Tom Alexander
54ed989300
Move Res into the error type module. 2022-12-18 03:04:31 -05:00
Tom Alexander
eaf8721ae9
Move paragraph to its own module. 2022-12-18 02:53:26 -05:00