Tom Alexander
9ccdcaac24
Port dynamic block.
2023-10-12 16:46:15 -04:00
Tom Alexander
d1223dcdb7
Port paragraph parser to use ak_element.
2023-10-12 16:37:31 -04:00
Tom Alexander
0d579263cb
Remove affiliated keyword non-exit for paragraph.
2023-10-12 14:07:57 -04:00
Tom Alexander
9523365090
Update all elements to the new AffiliatedKeywords.
2023-10-11 14:44:25 -04:00
Tom Alexander
47a440147f
Fix formatting.
rustfmt Build rustfmt has succeeded
rust-build Build rust-build has succeeded
rust-test Build rust-test has failed
rust-foreign-document-test Build rust-foreign-document-test has failed
2023-10-09 19:52:32 -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
1351577c5a
Fix handling affiliated keywords before invalid paragraphs.
2023-10-04 23:40:38 -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
a26640355c
Add check for name on paragraph.
2023-10-04 19:58:09 -04:00
Tom Alexander
b4c985071c
Add a GetStandardProperties trait.
2023-09-23 19:13:01 -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
d262833f9b
Fixing more errors.
2023-09-03 12:52:09 -04:00
Tom Alexander
cd69e08516
Fixing more errors.
2023-09-03 11:05:34 -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
9c1e6ccc97
Add a detect_element function.
...
rust-test Build rust-test has succeeded
rust-build Build rust-build has succeeded
This is an optimization. When you have something like plain text which ends when it hits the next element, we only need to parse enough to detect that an element is about to occur. For elements like plain lists, this is as simple as parsing a line starting with optional whitespace and then a bullet, which avoids parsing the entire plain list tree. The benefit is most noticeable in deeply nested plain lists.
2023-08-25 01:07:53 -04:00
Tom Alexander
02fe10fba3
Move objects to a lower exit class.
...
rust-test Build rust-test has succeeded
rust-build Build rust-build has succeeded
Paragraph's exit matcher which detects elements was causing the plain list parser to exit after the first item was parsed which was causing significant amounts of re-parsing.
2023-08-24 23:34:23 -04:00
Tom Alexander
cf37bc4111
Remove unnecessary context from some util functions.
rust-test Build rust-test has succeeded
rust-build Build rust-build has succeeded
2023-08-24 19:29:00 -04:00
Tom Alexander
e84e2b5147
Update tests to compile again.
2023-08-24 17:15:24 -04:00
Tom Alexander
dab598e5e7
Convert all functions to using the wrapped input type.
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
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