Rename data to switches in example and src block.

This commit is contained in:
Tom Alexander 2023-10-04 09:55:00 -04:00
parent bf038db31c
commit 1d7770e590
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
4 changed files with 8 additions and 4 deletions

View File

@ -0,0 +1,3 @@
#+begin_example elisp -n 5
foo
#+end_example

View File

@ -2,6 +2,7 @@
foo
#+end_example
# Line numbering starts at 15 for the example below since it uses +n.
#+begin_example +n 10
bar
#+end_example

View File

@ -158,7 +158,7 @@ pub(crate) fn example_block<'b, 'g, 'r, 's>(
ExampleBlock {
source: source.into(),
name: source.into(),
data: parameters.map(|parameters| Into::<&str>::into(parameters)),
switches: parameters.map(|parameters| Into::<&str>::into(parameters)),
contents: contents.into(),
},
))
@ -240,7 +240,7 @@ pub(crate) fn src_block<'b, 'g, 'r, 's>(
SrcBlock {
source: source.into(),
name: name.into(),
data: parameters.map(|parameters| Into::<&str>::into(parameters)),
switches: parameters.map(|parameters| Into::<&str>::into(parameters)),
contents: contents.into(),
},
))

View File

@ -40,7 +40,7 @@ pub struct CommentBlock<'s> {
pub struct ExampleBlock<'s> {
pub source: &'s str,
pub name: &'s str,
pub data: Option<&'s str>,
pub switches: Option<&'s str>,
pub contents: &'s str,
}
@ -56,7 +56,7 @@ pub struct ExportBlock<'s> {
pub struct SrcBlock<'s> {
pub source: &'s str,
pub name: &'s str,
pub data: Option<&'s str>,
pub switches: Option<&'s str>,
pub contents: &'s str,
}