Skip to content

Commit 634d93f

Browse files
committed
feat: Add spoiler, superscript and subscript attached modifiers
1 parent ac4abda commit 634d93f

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/stage_3.rs

+3-6
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ fn paragraph_parser_opener_candidates_and_links() -> impl Parser<
110110
> {
111111
let token = any().map(ParagraphSegment::Token);
112112
let modifier = select! {
113-
ParagraphSegmentToken::Special(c @ ('*' | '/' | '_' | '-')) => c,
113+
ParagraphSegmentToken::Special(c @ ('*' | '/' | '_' | '-' | '!' | '^' | ',')) => c,
114114
};
115115

116116
let whitespace_or_special = select! {
@@ -285,7 +285,7 @@ fn paragraph_parser_closer_candidates(
285285

286286
let token = any();
287287
let modifier = select! {
288-
Token(ParagraphSegmentToken::Special(c @ ('*' | '/' | '_' | '-'))) => c,
288+
Token(ParagraphSegmentToken::Special(c @ ('*' | '/' | '_' | '-' | '!' | '^' | ','))) => c,
289289
};
290290

291291
let whitespace_or_special = select! {
@@ -579,10 +579,7 @@ fn detached_modifier_extensions() -> impl Parser<
579579
.or_not()
580580
.map(|tokens| {
581581
if let Some(tokens) = tokens {
582-
tokens
583-
.into_iter()
584-
.map_into::<String>()
585-
.collect()
582+
tokens.into_iter().map_into::<String>().collect()
586583
} else {
587584
String::from("")
588585
}

0 commit comments

Comments
 (0)