Switches are not stored for comment blocks, but they are allowed to appear.
This commit is contained in:
@@ -95,7 +95,7 @@ pub(crate) fn comment_block<'b, 'g, 'r, 's>(
|
||||
input: OrgSource<'s>,
|
||||
) -> Res<OrgSource<'s>, CommentBlock<'s>> {
|
||||
let (remaining, name) = lesser_block_begin("comment")(context, input)?;
|
||||
let (remaining, parameters) = opt(tuple((space1, data)))(remaining)?;
|
||||
let (remaining, _parameters) = opt(tuple((space1, data)))(remaining)?;
|
||||
let (remaining, _nl) = recognize(tuple((space0, line_ending)))(remaining)?;
|
||||
let lesser_block_end_specialized = lesser_block_end("comment");
|
||||
let contexts = [
|
||||
@@ -109,10 +109,6 @@ pub(crate) fn comment_block<'b, 'g, 'r, 's>(
|
||||
let parser_context = context.with_additional_node(&contexts[0]);
|
||||
let parser_context = parser_context.with_additional_node(&contexts[1]);
|
||||
let parser_context = parser_context.with_additional_node(&contexts[2]);
|
||||
let parameters = match parameters {
|
||||
Some((_ws, parameters)) => Some(parameters),
|
||||
None => None,
|
||||
};
|
||||
|
||||
let (remaining, contents) = parser_with_context!(text_until_exit)(&parser_context)(remaining)?;
|
||||
let (remaining, _end) = lesser_block_end_specialized(&parser_context, remaining)?;
|
||||
@@ -123,7 +119,6 @@ pub(crate) fn comment_block<'b, 'g, 'r, 's>(
|
||||
CommentBlock {
|
||||
source: source.into(),
|
||||
name: name.into(),
|
||||
data: parameters.map(|parameters| Into::<&str>::into(parameters)),
|
||||
contents: contents.into(),
|
||||
},
|
||||
))
|
||||
|
||||
Reference in New Issue
Block a user