Harper thinks a `typst` function call is a sentence
Description
I don't know if this counts as a false positive or a bug so please correct me.
I use Typst and Harper for my thesis, which leads to me having the following in a Typst-file. The excerpt begins on line 1 (see provided screenshot). On thesis.with(, on line 3, Harper declares thesis.typ|3 col 8 note| This sentence is 84 words long though I'd call it a function call with separate strings that should count as separate sentences.
Is it only flagging a non-error or is a spurious fix also suggested?
Harper is not suggesting any fixes.
Screenshots
If applicable, add screenshots to help explain the false positive.
@grantlemons, any insight?
pub(crate) fn is_sentence_terminator(&self) -> bool {
match self {
TokenKind::Punctuation(punct) => [
Punctuation::Period,
Punctuation::Bang,
Punctuation::Question,
]
.contains(punct),
TokenKind::ParagraphBreak => true,
_ => false,
}
}
I think it may be a lack of ParagraphBreaks. Most of those are lexed to Unlintable.
I'm not sure how same this is, but:
#math.lr(size: 1em)
#show: rect.with()
#set math.lr(size: 1em)
I guess it can detect mistakes in function names, if it does, but it should ignore stuff from std.
I think it may be a lack of ParagraphBreaks. Most of those are lexed to Unlintable.
What needs to happen to get this fixed?