Commit Graph

40 Commits

Author SHA1 Message Date
Tom Alexander
df79cbd0b7 Give global options their own lifetime. 2023-09-03 16:22:40 -04:00
Tom Alexander
b54c6d366c Fixing more errors. 2023-09-03 00:27:50 -04:00
Tom Alexander
74a6101de7 Update RefContext to three lifetimes. 2023-09-02 22:45:46 -04:00
Tom Alexander
0d728510d7 Implement iterator for context. 2023-09-02 20:46:17 -04:00
Tom Alexander
564104f1e8 Switch to RefContext. 2023-09-02 19:16:44 -04:00
Tom Alexander
eabffe5ecc Move over the rest of the types. 2023-09-02 19:08:01 -04:00
Tom Alexander
466716881e Fix macros consuming whitespace even when the exit matcher is calling for an exit.
All checks were successful
rustfmt Build rustfmt has succeeded
rust-test Build rust-test has succeeded
rust-build Build rust-build has succeeded
2023-08-31 15:11:29 -04:00
Tom Alexander
f21385a901 Add a helper function for logging during debugging.
All checks were successful
rust-test Build rust-test has succeeded
rust-build Build rust-build has succeeded
2023-08-29 14:03:14 -04:00
Tom Alexander
cf37bc4111 Remove unnecessary context from some util functions.
All checks were successful
rust-test Build rust-test has succeeded
rust-build Build rust-build has succeeded
2023-08-24 19:29:00 -04:00
Tom Alexander
e5224cda63 Removing dead code.
All checks were successful
rust-test Build rust-test has succeeded
rust-build Build rust-build has succeeded
2023-08-24 18:40:25 -04:00
Tom Alexander
64e3481660 Update get_consumed to use the new wrapped input type. 2023-08-24 18:33:40 -04:00
Tom Alexander
e84e2b5147 Update tests to compile again. 2023-08-24 17:15:24 -04:00
Tom Alexander
720afa5d32 Update getting the previous character and previous line.
This can be done a lot more efficiently now that we are keeping track of this information in the wrapped input type instead of having to fetch to the original document out of the context tree.
2023-08-24 16:56:07 -04:00
Tom Alexander
dab598e5e7 Convert all functions to using the wrapped input type.
Some checks failed
rust-test Build rust-test has failed
rust-build Build rust-build has failed
2023-08-24 16:06:29 -04:00
Tom Alexander
6d1675fa00 Lifetime issue. 2023-08-22 22:57:44 -04:00
Tom Alexander
cd1b4ba785 Make the tracing macros optional. 2023-08-10 20:22:34 -04:00
Tom Alexander
5c1d913c99 Check that the preceding line for a line break is non-empty. 2023-07-22 00:43:02 -04:00
Tom Alexander
ec889bc868 Clean up old unused code. 2023-04-24 20:25:49 -04:00
Tom Alexander
a5585eb01f Add a not yet implemented function.
This helps when creating new parsers since todo!()s will panic the whole parser.
2023-04-24 20:11:13 -04:00
Tom Alexander
9968aedd74 Make sure text markup doesn't have interior spaces. 2023-04-22 22:34:37 -04:00
Tom Alexander
f964481544 Switch to using plain text with no additional exit matcher added. 2023-04-22 22:06:34 -04:00
Tom Alexander
0ca6ce504f Simulate trailing whitespace in empty greater blocks just like drawers. 2023-04-22 21:45:18 -04:00
Tom Alexander
a1724dae52 Combine the error types. 2023-04-21 18:36:01 -04:00
Tom Alexander
04dfffc000 Cleaning up compiler warnings. 2023-04-21 18:22:17 -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
e5bc4cb14b Footnote definitions are parsing on their own. 2023-04-10 11:50:43 -04:00
Tom Alexander
716f80b0ec Add initial implementation of footnote definition. 2023-04-07 17:14:44 -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
775e703ade Not sure whats going on. 2023-03-27 19:19:51 -04:00
Tom Alexander
9545990b52 Regurgitate seems to have made all text a paragraph. 2023-03-27 19:12:20 -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
a77d2655bd Instrument the code. 2023-03-27 16:36:43 -04:00
Tom Alexander
81a9a754de I seem to have solved the infinite loop issue by moving the exit check into the plain list parser. 2023-03-27 12:52:49 -04:00
Tom Alexander
e6752b9d83 Building the plain list item context. 2023-03-25 14:10:22 -04:00
Tom Alexander
3a0a4c8953 Consume the trailing whitespace after a headline. 2023-03-25 11:59:19 -04:00
Tom Alexander
3c26933e7f Move some functions into util. 2023-03-25 11:25:10 -04:00
Tom Alexander
36210c2d7f Add a DocumentRoot context element storing the original full document.
This might be used for look-behind instead of storing previous element nodes in the context tree.
2023-03-23 16:40:39 -04:00
Tom Alexander
88c974f8e4 Record the list item indent depth in the context tree. 2023-03-18 13:26:35 -04:00
Tom Alexander
50a67c65ef Standardize order of lifetimes for r and s. 2022-12-18 03:30:36 -05:00
Tom Alexander
8211e1043f Move in_section to a util module. 2022-12-18 03:18:43 -05:00