Commit Graph

60 Commits

Author SHA1 Message Date
Tom Alexander
cce9ca87fa Fix handling of leading blank lines in greater blocks.
Some checks failed
clippy Build clippy has failed
rust-foreign-document-test Build rust-foreign-document-test has failed
rust-build Build rust-build has succeeded
rust-test Build rust-test has failed
2023-12-15 16:55:47 -05:00
Tom Alexander
683c523ece Implement the new fields for greater block. 2023-12-15 16:15:22 -05:00
Tom Alexander
5e2dea1f28 Remove the SetSource trait.
It was only being used for creating paragraphs of specific text, so I just adjusted the of_text function to handle it.
2023-10-23 17:43:32 -04:00
Tom Alexander
20c4a0f8f7 Continue removing MyError. 2023-10-17 10:35:33 -04:00
Tom Alexander
77e6c22ad8 Continue removing MyError. 2023-10-17 10:09:37 -04:00
Tom Alexander
c9d7251e3b Begin removing the MyError type. 2023-10-17 09:45:18 -04:00
Tom Alexander
3069711447 Apply more suggestions. 2023-10-16 18:29:21 -04:00
Tom Alexander
b9c638c280 Fix tracing.
Some checks failed
rustfmt Build rustfmt has succeeded
rust-build Build rust-build has failed
rust-foreign-document-test Build rust-foreign-document-test has failed
rust-test Build rust-test has succeeded
2023-10-14 19:02:35 -04:00
Tom Alexander
59448a4f2c Port greater blocker over to ak_element!(). 2023-10-12 16:27:57 -04:00
Tom Alexander
9523365090 Update all elements to the new AffiliatedKeywords. 2023-10-11 14:44:25 -04:00
Tom Alexander
df4daa0e16 Do not include context in tracing. 2023-10-09 18:02:36 -04:00
Tom Alexander
758e224e6d Move consuming trailing element whitespace inside the parsers.
This ensures the parsers can take into account the affiliated keywords when setting their source without needing the SetSource trait.
2023-10-06 12:02:14 -04:00
Tom Alexander
93fe46e4e7 Populate the name field on elements. 2023-10-04 21:27:55 -04:00
Tom Alexander
786521ad4a Add affiliated keyword matching to the detect_* functions. 2023-10-04 21:03:32 -04:00
Tom Alexander
d8102b7bc2 Move the affiliated keywords parser inside the specific element parsers.
We need access to the affiliated keywords to do things like set the name of the element, and only half the element parsers are allowed to have affiliated keywords, so it makes sense to move it inside the specific parsers.
2023-10-04 20:55:48 -04:00
Tom Alexander
ae66d1bd89 Fix tracing build.
All checks were successful
rustfmt Build rustfmt has succeeded
rust-build Build rust-build has succeeded
rust-test Build rust-test has succeeded
rust-foreign-document-test Build rust-foreign-document-test has succeeded
2023-10-02 22:45:25 -04:00
Tom Alexander
2352636672 Split GreaterBlock into CenterBlock, QuoteBlock, and SpecialBlock.
Center and quote blocks do not have parameters nor do they store their name so I am separating them out.
2023-10-02 22:33:00 -04:00
Tom Alexander
36217f5704 Do not capture trailing whitespace in parameters. 2023-10-02 21:14:07 -04:00
Tom Alexander
fdebf6dec5 Delete already solved TODO. 2023-09-15 21:08:52 -04:00
Tom Alexander
444d6758aa Handle leading blank lines in greater blocks.
Some checks failed
rust-test Build rust-test has succeeded
rust-build Build rust-build has succeeded
rust-foreign-document-test Build rust-foreign-document-test has failed
2023-09-15 21:03:35 -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
df79cbd0b7 Give global options their own lifetime. 2023-09-03 16:22:40 -04:00
Tom Alexander
0b009511ff Fixing more errors. 2023-09-03 12:28:45 -04:00
Tom Alexander
fdf35ba23c Fixing more errors. 2023-09-03 12:07:51 -04:00
Tom Alexander
74a6101de7 Update RefContext to three lifetimes. 2023-09-02 22:45:46 -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
510985e97c Fix greater blocks by preventing nesting even if they are not the immediate parent. 2023-08-31 19:17:46 -04:00
Tom Alexander
5171326d63 Create a test for special blocks. 2023-08-31 19:02:18 -04:00
Tom Alexander
20c17c40be Switch greater blocks to using name provided when building exit matcher instead of from context. 2023-08-28 01:18:45 -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
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
cd1b4ba785 Make the tracing macros optional. 2023-08-10 20:22:34 -04:00
Tom Alexander
208e2cfe87 Clean up imports. 2023-04-22 21:51:53 -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
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
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
a1724dae52 Combine the error types. 2023-04-21 18:36:01 -04:00
Tom Alexander
47844caa5c A first stab at lesser blocks. 2023-04-21 16:58:38 -04:00
Tom Alexander
d780981baf Separate out the element parsers. 2023-04-21 16:10:56 -04:00
Tom Alexander
7ac0cee223 Support nesting greater blocks of different names. 2023-04-19 15:00:02 -04:00
Tom Alexander
cab5ba70e5 Parser for dynamic blocks. 2023-04-19 13:51:18 -04:00
Tom Alexander
0d07a6aad3 Initial structure for dynamic blocks. 2023-04-19 13:30:15 -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
13a2ba1dc5 Handle greater blocks with only blank space inside them. 2023-04-18 21:28:22 -04:00
Tom Alexander
a2051aca4f Remove ChainBehavior. 2023-04-18 20:44:58 -04:00