Fixed an edge case in strict flanking rules
ci/woodpecker/push/ociImagePush Pipeline is running Details

This commit is contained in:
Natty 2024-03-13 14:31:05 +01:00
parent 799730bedc
commit a640890cad
Signed by: natty
GPG Key ID: BF6CB659ADEE60EC
1 changed files with 10 additions and 1 deletions

View File

@ -1027,7 +1027,7 @@ impl Context {
alphanumeric1_unicode,
opt(tag("\\")),
&opening_tag,
peek(not(alt((space1_unicode, eof)))),
peek(not(alt((recognize(satisfy(|c| c.is_whitespace())), eof)))),
))))(input)?;
if let Some(pre_text) = pre {
@ -1909,6 +1909,15 @@ mod test {
Token::PlainText("aaa_nnn_bbb".into())
);
assert_eq!(
parse_full("aaa\n_iii_\nbbb"),
Token::Sequence(vec![
Token::PlainText("aaa\n".into()),
Token::Italic(Box::new(Token::PlainText("iii".into()))),
Token::PlainText("\nbbb".into())
])
);
assert_eq!(
parse_full(r#"*iii*"#),
Token::Italic(Box::new(Token::PlainText("iii".into())))