From ba15999534cc6700823354b99e4a874fee3b4c49 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Thu, 21 Sep 2023 14:30:56 -0400 Subject: [PATCH] Add a test showing we are not handling parenthesis in links properly. --- org_mode_samples/object/plain_link/with_parenthesis.org | 1 + .../{plain_link => regular_link}/wrapped_with_brackets.org | 0 .../subscript_and_superscript/options_require_braces.org | 7 +++++++ src/compare/diff.rs | 4 ++++ 4 files changed, 12 insertions(+) create mode 100644 org_mode_samples/object/plain_link/with_parenthesis.org rename org_mode_samples/object/{plain_link => regular_link}/wrapped_with_brackets.org (100%) create mode 100644 org_mode_samples/object/subscript_and_superscript/options_require_braces.org diff --git a/org_mode_samples/object/plain_link/with_parenthesis.org b/org_mode_samples/object/plain_link/with_parenthesis.org new file mode 100644 index 00000000..b10448a8 --- /dev/null +++ b/org_mode_samples/object/plain_link/with_parenthesis.org @@ -0,0 +1 @@ +https://en.wikipedia.org/wiki/Shebang_(Unix) diff --git a/org_mode_samples/object/plain_link/wrapped_with_brackets.org b/org_mode_samples/object/regular_link/wrapped_with_brackets.org similarity index 100% rename from org_mode_samples/object/plain_link/wrapped_with_brackets.org rename to org_mode_samples/object/regular_link/wrapped_with_brackets.org diff --git a/org_mode_samples/object/subscript_and_superscript/options_require_braces.org b/org_mode_samples/object/subscript_and_superscript/options_require_braces.org new file mode 100644 index 00000000..22328e08 --- /dev/null +++ b/org_mode_samples/object/subscript_and_superscript/options_require_braces.org @@ -0,0 +1,7 @@ +# Even though *exporting* honors the setting to require braces for subscript/superscript, the official org-mode parser still parses subscripts and superscripts. + +#+OPTIONS: ^:{} +foo_this isn't a subscript when exported due to lack of braces (but its still a subscript during parsing) + + +bar_{this is a subscript} diff --git a/src/compare/diff.rs b/src/compare/diff.rs index a135a981..c1416036 100644 --- a/src/compare/diff.rs +++ b/src/compare/diff.rs @@ -2477,6 +2477,8 @@ fn compare_subscript<'s>( Ok(_) => {} }; + // TODO compare :use-brackets-p + Ok(DiffResult { status: this_status, name: emacs_name.to_owned(), @@ -2508,6 +2510,8 @@ fn compare_superscript<'s>( Ok(_) => {} }; + // TODO compare :use-brackets-p + Ok(DiffResult { status: this_status, name: emacs_name.to_owned(),