diff --git a/src/comment.rs b/src/comment.rs index 241934a7d3d..09185c89ead 100644 --- a/src/comment.rs +++ b/src/comment.rs @@ -990,11 +990,11 @@ fn is_table_item(mut s: &str) -> bool { // This function may return false positive, but should get its job done in most cases (i.e. // markdown tables with two column delimiters). s = s.trim_start(); - return s.starts_with('|') + s.starts_with('|') && match s.rfind('|') { Some(0) | None => false, _ => true, - }; + } } /// Given the span, rewrite the missing comment inside it if available.