Prefer the longer version of affiliated keywords.

This commit is contained in:
Tom Alexander 2023-09-06 17:26:10 -04:00
parent 5cefcd5fac
commit 90fa48661c
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
2 changed files with 9 additions and 2 deletions

View File

@ -0,0 +1,7 @@
# This test is to prove that the parser works with affiliated keywords that have both a shorter and longer version.
#+results:
#+result:
#+begin_latex
\foo
#+end_latex

View File

@ -26,8 +26,8 @@ use crate::parser::util::start_of_line;
use crate::types::Keyword; use crate::types::Keyword;
const ORG_ELEMENT_AFFILIATED_KEYWORDS: [&'static str; 13] = [ const ORG_ELEMENT_AFFILIATED_KEYWORDS: [&'static str; 13] = [
"caption", "data", "header", "headers", "label", "name", "plot", "resname", "result", "caption", "data", "headers", "header", "label", "name", "plot", "resname", "results",
"results", "source", "srcname", "tblname", "result", "source", "srcname", "tblname",
]; ];
const ORG_ELEMENT_DUAL_KEYWORDS: [&'static str; 2] = ["caption", "results"]; const ORG_ELEMENT_DUAL_KEYWORDS: [&'static str; 2] = ["caption", "results"];