Handle bullshitium for 🔚.

This commit is contained in:
Tom Alexander
2023-10-18 11:57:39 -04:00
parent bcdf1f5e9d
commit b0b287cd47
5 changed files with 92 additions and 2 deletions

View File

@@ -32,6 +32,8 @@ use crate::event_count::record_event;
#[cfg(feature = "event_count")]
use crate::event_count::EventType;
use crate::parser::affiliated_keyword::affiliated_keywords;
use crate::parser::bullshitium::bullshitium;
use crate::parser::bullshitium::detect_bullshitium;
use crate::parser::macros::ak_element;
use crate::parser::macros::element;
use crate::parser::table::org_mode_table;
@@ -242,6 +244,9 @@ fn _element<'b, 'g, 'r, 's>(
);
if can_be_paragraph {
// Fake paragraphs
element!(bullshitium, context, input, Element::Paragraph);
// Paragraph without affiliated keyword
ak_element!(
paragraph,
@@ -319,6 +324,11 @@ fn _detect_element<'b, 'g, 'r, 's>(
input
);
// Fake paragraphs
if !can_be_paragraph {
element!(detect_bullshitium, context, input);
}
if _element(context, input, can_be_paragraph).is_ok() {
return Ok((input, ()));
}