Commit Graph

1343 Commits

Author SHA1 Message Date
Tom Alexander 1351577c5a
Fix handling affiliated keywords before invalid paragraphs. 2023-10-04 23:40:38 -04:00
Tom Alexander 65eda08843
Re-work the element parser to handle affiliated keywords before elements that cannot have affiliated keywords. 2023-10-04 22:47:13 -04:00
Tom Alexander b82d4c0eca
Fix finding name keyword in affiliated keywords list. 2023-10-04 21:32:10 -04:00
Tom Alexander 93fe46e4e7
Populate the name field on elements. 2023-10-04 21:27:55 -04:00
Tom Alexander 5b308ea76f
Implement a function to read the name from the affiliated keywords. 2023-10-04 21:12:06 -04:00
Tom Alexander ab4a0c1224
Clean up. 2023-10-04 21:05:20 -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 057c8a1387
Compare name. 2023-10-04 19:43:34 -04:00
Tom Alexander 4fc81e983a
Add tests for names for lesser blocks. 2023-10-04 19:39:50 -04:00
Tom Alexander 258e9485de
Add tests for names and references in src and example blocks. 2023-10-04 19:34:10 -04:00
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 e1e4ac75e4
Add a test for preserve indent. 2023-10-04 19:05:28 -04:00
Tom Alexander c877116540
Fix handling of spaces between language, switches, and parameters. 2023-10-04 18:57:51 -04:00
Tom Alexander 8e70773b15
Fix handling cases where only language is specified before parameters. 2023-10-04 18:11:38 -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 a548c7e170
Exclude language from the switches property. 2023-10-04 17:11:13 -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 13163f2468
Retain labels stays a boolean without -r. 2023-10-04 16:37:15 -04:00
Tom Alexander da5dcd4c1b
Support multiple commas when escaping lines. 2023-10-04 16:03:45 -04:00
Tom Alexander d059afef07
Add a setting for coderef_label_format. 2023-10-04 15:48:57 -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 32da06776c
Handle matching no 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 1503054994
Make an argument for the line number switch optional. 2023-10-04 11:46:02 -04:00
Tom Alexander 03028889bd
Fix capturing trailing whitespace for switches. 2023-10-04 11:34:01 -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 650cbc17db
Compare switches for example block. 2023-10-04 10:04:11 -04:00
Tom Alexander 1d7770e590
Rename data to switches in example and src block. 2023-10-04 09:59:11 -04:00
Tom Alexander bf038db31c
Add test showing trailing whitespace is captured in the switches. 2023-10-04 09:53:33 -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 2eaef82fdb
Organize lesser block tests into subfolders. 2023-10-04 09:46:09 -04:00
Tom Alexander 00dc7b636c
Add more tests. 2023-10-04 09:42:36 -04:00
Tom Alexander e6c809ab03
Compare value for comment block. 2023-10-04 09:35:19 -04:00
Tom Alexander e673aa862e
Publish version 0.1.9.
rustfmt Build rustfmt has succeeded Details
rust-build Build rust-build has succeeded Details
rust-test Build rust-test has succeeded Details
rust-foreign-document-test Build rust-foreign-document-test has succeeded Details
2023-10-03 00:18:00 -04:00
Tom Alexander 3b6659c5fd
Merge branch 'table_properties'
rustfmt Build rustfmt has succeeded Details
rust-build Build rust-build has succeeded Details
rust-test Build rust-test has succeeded Details
rust-foreign-document-test Build rust-foreign-document-test has succeeded Details
2023-10-03 00:14:21 -04:00
Tom Alexander 68a3f8b87e
Fix table rule row detection. 2023-10-03 00:13:15 -04:00
Tom Alexander b1244de1dc
Compare row type. 2023-10-03 00:03:58 -04:00
Tom Alexander e5a402ee1b
Compare type and value.
rust-build Build rust-build has succeeded Details
rust-test Build rust-test has succeeded Details
rust-foreign-document-test Build rust-foreign-document-test has succeeded Details
Since we only support org-mode tables, type is always org. Value seems to always be nil, not sure why.
2023-10-02 23:57:17 -04:00
Tom Alexander d4a2ad4a7f
Merge branch 'node_property_properties'
rustfmt Build rustfmt has succeeded Details
rust-build Build rust-build has succeeded Details
rust-test Build rust-test has succeeded Details
rust-foreign-document-test Build rust-foreign-document-test has succeeded Details
2023-10-02 23:47:11 -04:00
Tom Alexander 3d1b2713ed
Compare key and value. 2023-10-02 23:45:31 -04:00
Tom Alexander 60bec4695b
Merge branch 'drawer_properties' 2023-10-02 23:38:34 -04:00
Tom Alexander d992947ff1
Compare name. 2023-10-02 23:34:06 -04:00