Commit Graph

1446 Commits

Author SHA1 Message Date
Tom Alexander
b9ead09dde
Add test showing we are not handling trailing whitespace in macro args properly. 2023-10-08 16:34:28 -04:00
Tom Alexander
dd009498dd
Switch to using coalesce_whitespace_escaped for macro args.
Some checks failed
rust-build Build rust-build has succeeded
rust-test Build rust-test has succeeded
rust-foreign-document-test Build rust-foreign-document-test has failed
2023-10-08 16:19:25 -04:00
Tom Alexander
17c745ee71
Improve coalesce_whitespace_escaped to borrow when single spaces are used. 2023-10-08 16:15:49 -04:00
Tom Alexander
41aa0349a0
Add tests for coalesce_whitespace_escaped. 2023-10-08 16:06:52 -04:00
Tom Alexander
a6adeee40b
Handle escaping the characters in org macro arguments. 2023-10-08 15:54:56 -04:00
Tom Alexander
a32cea8139
Coalesce whitespace in macro args. 2023-10-08 15:08:21 -04:00
Tom Alexander
37bc5ef712
Do not include whitespace at the end of value. 2023-10-08 14:48:29 -04:00
Tom Alexander
1a2f0856da
Compare macro properties. 2023-10-08 14:40:01 -04:00
Tom Alexander
3f707149e3
Merge branch 'angle_link_properties'
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-08 14:18:25 -04:00
Tom Alexander
e9276e35ca
Add comments. 2023-10-08 14:18:17 -04:00
Tom Alexander
3041a575f9
Fix lifetimes. 2023-10-08 14:13:02 -04:00
Tom Alexander
42dbda494a
Switch to using a similar optimized Cow function for regular link. 2023-10-08 14:11:46 -04:00
Tom Alexander
0e791e67ab
Move the angle link string processing functions to a util file.
Since I bothered to do the right thing and implement these as returning Cow so I can avoid unnecessary allocations, I figure I should move them to a util file so they can be re-used.
2023-10-08 13:36:57 -04:00
Tom Alexander
ba55e0df4f
Remove all whitespace from search option if it contains any line breaks and handle triple+ slashes for file links. 2023-10-08 13:23:12 -04:00
Tom Alexander
d987b9b75b
Remove line breaks from path and do not allow search option for protocol links. 2023-10-08 13:02:09 -04:00
Tom Alexander
aa253c38dd
Parse out the angle link properties. 2023-10-08 12:46:18 -04:00
Tom Alexander
ceb5376b21
Fix handling of search option for plain links when parenthesis are involved. 2023-10-08 10:57:05 -04:00
Tom Alexander
b64c1c944b
Allow :: to end links regardless of parenthesis. 2023-10-08 10:57:05 -04:00
Tom Alexander
8bc79f9ef3
Add tests for angle links. 2023-10-08 10:57:04 -04:00
Tom Alexander
488372b070
Merge branch 'plain_link_properties'
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-08 10:04:44 -04:00
Tom Alexander
120a06055f
Handle 3 or more slashes in the path for regular links. 2023-10-08 09:54:10 -04:00
Tom Alexander
bbcafef8bf
Handle 3 or more slashes in the path for plain links. 2023-10-08 09:51:12 -04:00
Tom Alexander
038535174b
Do not allow empty path in plain links and do not remove "//" in regular links. 2023-10-08 09:34:47 -04:00
Tom Alexander
1bbe8fc688
Do not strip "//" from plain link path. 2023-10-08 09:28:09 -04:00
Tom Alexander
ba8115c648
Remove "//" from file paths. 2023-10-08 09:16:48 -04:00
Tom Alexander
0030ef4459
Parse application and handle parenthesis in regular links. 2023-10-08 09:10:47 -04:00
Tom Alexander
20a8683894
Handle puncuation-only search options.
Some checks failed
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-07 03:25:37 -04:00
Tom Alexander
3aa84c1743
Add test showing we are not handling puncutation-only search options properly. 2023-10-07 03:23:45 -04:00
Tom Alexander
7196e10b69
Set up regular links for adding application. 2023-10-07 03:14:16 -04:00
Tom Alexander
0c34df159f
Add test showing we are not handling application in regular links properly. 2023-10-07 03:03:57 -04:00
Tom Alexander
ddb09a1805
Add support for application in plain links. 2023-10-07 03:00:40 -04:00
Tom Alexander
c58b850570
Add support for search options. 2023-10-07 02:42:07 -04:00
Tom Alexander
a55694176c
Compare the properties of plain links. 2023-10-07 02:22:36 -04:00
Tom Alexander
6973d5a2c0
Since value and path are always the same for radio links, I removed the extra value. 2023-10-07 01:48:16 -04:00
Tom Alexander
592e773920
Add tests for plain link search options and relative paths. 2023-10-07 01:44:31 -04:00
Tom Alexander
be553aefb1
Add test showing plain links cannot be templates. 2023-10-07 01:44:31 -04:00
Tom Alexander
5694f80f41
Merge branch 'radio_target_properties'
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-07 01:43:58 -04:00
Tom Alexander
36327e92d7
Radio link did not need Cow.
All checks were successful
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
I was only using Cow because regular links can use templates which would require owned data. Radio links do not share this feature.
2023-10-07 01:26:52 -04:00
Tom Alexander
c70eb69ed6
Compare radio target properties. 2023-10-07 01:24:32 -04:00
Tom Alexander
8d9ff77799
Merge branch 'radio_link_properties'
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-07 01:14:12 -04:00
Tom Alexander
029791e0b2
Fix tests. 2023-10-07 01:01:04 -04:00
Tom Alexander
8d621b32dc
Compare radio link properties.
Some checks failed
rust-test Build rust-test has failed
rust-build Build rust-build has succeeded
rust-foreign-document-test Build rust-foreign-document-test has succeeded
2023-10-07 00:57:55 -04:00
Tom Alexander
dfad7b7888
Merge branch 'regular_link_properties'
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-07 00:34:14 -04:00
Tom Alexander
56348a6d54
Actually absolute paths are files too.
All checks were successful
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-07 00:15:37 -04:00
Tom Alexander
65e142a215
Link templates support single-colons and inject the value at the end if no %s is found. 2023-10-06 23:55:21 -04:00
Tom Alexander
aa0a0b890e
Relative paths are file links, absolute paths are fuzzy. 2023-10-06 23:48:55 -04:00
Tom Alexander
ab33730830
Search option also supports regex.
Some checks failed
rust-build Build rust-build has succeeded
rust-test Build rust-test has succeeded
rust-foreign-document-test Build rust-foreign-document-test has failed
As seen on the list of possible search options at https://orgmode.org/manual/Search-Options.html.
2023-10-06 23:33:09 -04:00
Tom Alexander
4c8828b91b
Apply the link templates. 2023-10-06 23:33:09 -04:00
Tom Alexander
2ba5156ee1
Add a global setting for link templates. 2023-10-06 20:34:13 -04:00
Tom Alexander
ae3a6ff919
Turns out links can have templates. 2023-10-06 20:23:19 -04:00