pub fn line_is_comment(line: &str, cfg: ReflowConfig<'_>) -> boolExpand description
Whether line reads as a comment, by its leading marker alone.
Lexical on purpose (§9). A tree-sitter query would also know that
a // inside a string literal is not a comment, and would put a
parse on the typing path — which paramount #1 does not allow for
accuracy that costs a frame. The inaccuracy is a comment marker
inside a string, which is rare, and its consequence is one wrapped
line the user can undo.