Commit Graph

54 Commits

Author SHA1 Message Date
Tom Alexander
c1de001786 Require a space after colon instead of tab for fixed width area. 2023-09-19 20:22:29 -04:00
Tom Alexander
d443dbd468 Introduce the tab_width setting and give tabs a greater value when counting indentation level. 2023-09-15 21:59:48 -04:00
Tom Alexander
c9ce32c881 Remve redundant org_spaces functions.
Turns out the nom space0/space1 parsers accept tab characters already.
2023-09-15 21:28:40 -04:00
Tom Alexander
44e9f708c9 Handle the possibility of a title-less headline. 2023-09-14 02:01:24 -04:00
Tom Alexander
84953c1669 Put back in needed pubs. 2023-09-11 14:59:23 -04:00
Tom Alexander
7650a9edff Remove all pub. 2023-09-11 13:11:08 -04:00
Tom Alexander
21c60d1036 Do not consume trailing whitespace on the footnote definition's final element. 2023-09-08 21:30:03 -04:00
Tom Alexander
a8fbf01124 Handle tabs for plain list descriptions.
This bug probably exists in hundreds of places across the code base. I am going to have to write a "fuzzer" that replaces random whitespace with tabs to find them all.
2023-09-08 20:02:49 -04:00
Tom Alexander
ceb722e476 Check exit matcher after each space consumed for object trailing whitespace.
Since description list tags need to end with a space unconsumed for " ::", we need to check the exit matcher after each space consumed.
2023-09-08 19:38:49 -04:00
Tom Alexander
b0930df788 Support zero skipped text in OrgSource slicing. 2023-09-07 04:16:00 -04:00
Tom Alexander
ba291c6776 Unify two places checking if text was preceded by whitespace. 2023-09-07 04:16:00 -04:00
Tom Alexander
6b82b46e09 Prevent nesting of text markup of the same type.
This greatly reduces the amount of detect element calls that are occurring.
2023-09-07 04:15:59 -04:00
Tom Alexander
3fc3a5d1ef Add support for empty lesser blocks. 2023-09-06 18:11:57 -04:00
Tom Alexander
728a79f9a4 Handle zero-width space in text markup.
All checks were successful
rustfmt Build rustfmt has succeeded
rust-test Build rust-test has succeeded
rust-build Build rust-build has succeeded
2023-09-06 13:56:27 -04:00
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