Tom Alexander
87ac18e6b2
Add real handling for preserve indent.
...
Now that I know which flag changes this setting, we can handle it properly.
2023-10-04 19:23:47 -04:00
Tom Alexander
f046b16c11
Compare src block parameters.
2023-10-04 18:02:50 -04:00
Tom Alexander
1ab7d2f2d7
Add a test showing we are not handling exports flags properly.
2023-10-04 17:32:51 -04:00
Tom Alexander
b556f4617f
Add src block properties.
...
These are largely the same as example blocks but with a :language property.
2023-10-04 16:58:45 -04:00
Tom Alexander
bcade66e68
Retain labels is actually either a boolean or a number.
2023-10-04 15:43:09 -04:00
Tom Alexander
301a6db83e
Fix retain labels.
...
This is a numeric value based on the character offset of -k from the beginning of the switches.
2023-10-04 15:21:27 -04:00
Tom Alexander
169bf69f5e
Preserve the leading whitespace before an escape.
2023-10-04 15:21:27 -04:00
Tom Alexander
7ee48ff65c
Switch to handling the unescaping during the initial parsing.
...
This preserves the line ending characters unlike the rust .lines() iterator.
2023-10-04 15:21:27 -04:00
Tom Alexander
afb43ff34f
Switch to getting the contents with a function to handle the escaped lines.
2023-10-04 15:21:27 -04:00
Tom Alexander
b56d847cfa
Compare label format, retain labels, and use labels.
2023-10-04 15:21:27 -04:00
Tom Alexander
317293f0f2
Extract the line number from the switches.
2023-10-04 11:31:45 -04:00
Tom Alexander
3d7f411cf9
Compare number lines for example blocks.
2023-10-04 10:31:01 -04:00
Tom Alexander
1d7770e590
Rename data to switches in example and src block.
2023-10-04 09:59:11 -04:00
Tom Alexander
4cdf88a632
Switches are not stored for comment blocks, but they are allowed to appear.
2023-10-04 09:51:28 -04:00
Tom Alexander
b1244de1dc
Compare row type.
2023-10-03 00:03:58 -04:00
Tom Alexander
3d1b2713ed
Compare key and value.
2023-10-02 23:45:31 -04:00
Tom Alexander
b56318fbe4
Add TODO comment.
2023-10-02 23:29:58 -04:00
Tom Alexander
8169499de3
Compare value.
2023-10-02 23:28:32 -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
a80d171e4d
Bubble up planning variables to the headline.
2023-10-02 20:37:46 -04:00
Tom Alexander
2e1a946ac9
Compare scheduled, deadline, and closed.
2023-10-02 20:25:08 -04:00
Tom Alexander
6a8ae9d838
Compare warning delay and repeater.
2023-10-02 18:58:30 -04:00
Tom Alexander
512432c5f0
Do not allow time range timestamps with REST on the first TIME.
2023-10-02 17:51:33 -04:00
Tom Alexander
890cd3e4fd
Compare start/end time.
2023-10-02 17:17:05 -04:00
Tom Alexander
9846cde2f0
Trim whitespace from raw value.
2023-10-02 16:32:33 -04:00
Tom Alexander
dec3242e72
Implement the Time struct.
2023-10-02 16:24:51 -04:00
Tom Alexander
a8a34e2d9c
Compare date start/end.
2023-10-02 16:16:19 -04:00
Tom Alexander
e7ec23af3d
Move the Date struct into types and implement a get_property_numeric.
2023-10-02 15:49:51 -04:00
Tom Alexander
3ed9b552e2
Compare range type.
2023-10-02 14:35:45 -04:00
Tom Alexander
d04c8c832c
Compare timestamp type.
2023-10-02 13:40:37 -04:00
Tom Alexander
a62c3fc522
Move AstNode into the types crate.
...
Now that it is used for more than just iteration, it makes sense to promote it to the types crate.
2023-10-02 13:10:45 -04:00
Tom Alexander
1b788f3f21
Fix lifetimes on StandardProperties.
2023-10-02 12:11:05 -04:00
Tom Alexander
178894680b
Compare footnote section.
2023-10-02 10:48:34 -04:00
Tom Alexander
d78ce10a0b
Compare raw-value.
2023-10-02 10:26:57 -04:00
Tom Alexander
3fb2b5d31c
Undo the getters change.
...
The getters were a good idea, but if we are going to support editing later, we will need to expose the fields or write A LOT of boiler-plate. The getters also would prevent people from moving values out of the AST without even more boiler-plate. It is simply not worth it at this stage, so we will need to tolerate frequently changing semver versions as the public interface changes since *every* field in the AST is public.
2023-09-29 21:14:55 -04:00
Tom Alexander
d1dac0b8de
Compare document category.
2023-09-29 20:57:09 -04:00
Tom Alexander
93f1bcd744
Add getters for Document.
2023-09-29 20:57:09 -04:00
Tom Alexander
dae10c2eef
Initial work for exposing getters and hiding the fields of the ast nodes.
...
Ultimately this is about semver and exposing a stable interface while allowing the internal representation to change. The fields are still pub(crate) to make constructing the types easier inside this crate, which should be fine because we can refactor the code inside this crate whenever the internal structure changes.
2023-09-29 20:40:31 -04:00
Tom Alexander
064a4eeee7
Compare plain list item pre blank.
2023-09-29 19:30:02 -04:00
Tom Alexander
7727b5ef47
Compare plain list item counter.
2023-09-29 18:45:38 -04:00
Tom Alexander
a4b1d462c3
Parse out the plain list type.
2023-09-29 12:49:10 -04:00
Tom Alexander
d5b1014fe4
Unify the standard properties checks in diff.
...
Instead of copy+pasting them into each compare function, we now call a shared function from a handful of places.
2023-09-23 21:05:56 -04:00
Tom Alexander
b4c985071c
Add a GetStandardProperties trait.
2023-09-23 19:13:01 -04:00
Tom Alexander
3fe56e9aa3
Implement StandardProperties for all the AST nodes and restrict the Source trait to this crate.
...
Currently this is a copy of the Source trait but it will grow to more functions. The Source trait is restricted to this crate in anticipation of its removal in favor of StandardProperties.
2023-09-23 17:42:27 -04:00
Tom Alexander
f180412ff3
Introduce a StandardProperties trait.
2023-09-23 17:33:46 -04:00
Tom Alexander
9bcfb2f1da
Decide headline nesting by star count, not headline level.
...
It is possible to have two headlines that have the same level but different star counts when set to Odd because of rounding. Deciding nesting by star count instead of headline level avoids this issue.
2023-09-20 03:22:25 -04:00
Tom Alexander
1a704dd312
Honor the odd startup setting from org-mode files.
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 22:54:49 -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
bfe67b1f75
Parse plain list item checkboxes.
2023-09-15 16:09:57 -04:00
Tom Alexander
37e85158ea
Reduce the exposed functions when compare feature is enabled.
2023-09-12 15:48:37 -04:00