Skip to content

Commit

Permalink
Fix newline before alert
Browse files Browse the repository at this point in the history
  • Loading branch information
lampsitter committed Apr 2, 2024
1 parent bb6f6a7 commit 7074018
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/parsers/pulldown.rs
Original file line number Diff line number Diff line change
Expand Up @@ -430,16 +430,17 @@ impl CommonMarkViewerInternal {
if self.is_blockquote {
let mut collected_events = delayed_events(events, pulldown_cmark::TagEnd::BlockQuote);

if self.should_insert_newline {
newline(ui)
}

if let Some(alert) = parse_alerts(&options.alerts, &mut collected_events) {
alert.ui(ui, |ui| {
for (event, src_span) in collected_events.into_iter() {
self.event(ui, event, src_span, cache, options, max_width);
}
})
} else {
if self.should_insert_newline {
newline(ui)
}
blockquote(ui, ui.visuals().weak_text_color(), |ui| {
self.text_style.quote = true;
for (event, src_span) in collected_events {
Expand Down

0 comments on commit 7074018

Please sign in to comment.