mirror of
https://github.com/typst/typst
synced 2025-05-23 05:25:28 +08:00
Improve argument naming and fix grammar in comment ♻
This commit is contained in:
parent
53ca5a7fc5
commit
9672d43200
@ -204,10 +204,10 @@ impl Feedback {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Add more feedback whose spans are local and need to be offset by an
|
/// Add more feedback whose spans are local and need to be offset by an
|
||||||
/// `offset` to be correct for this feedbacks context.
|
/// `offset` to be correct in this feedback's context.
|
||||||
pub fn extend_offset(&mut self, other: Feedback, offset: Position) {
|
pub fn extend_offset(&mut self, more: Feedback, offset: Position) {
|
||||||
self.problems.extend(offset_spans(other.problems, offset));
|
self.problems.extend(offset_spans(more.problems, offset));
|
||||||
self.decos.extend(offset_spans(other.decos, offset));
|
self.decos.extend(offset_spans(more.decos, offset));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ pub fn parse(src: &str, offset: Position, state: &ParseState) -> Pass<SyntaxMode
|
|||||||
let span = token.span;
|
let span = token.span;
|
||||||
let node = match token.v {
|
let node = match token.v {
|
||||||
// Starting from two newlines counts as a paragraph break, a single
|
// Starting from two newlines counts as a paragraph break, a single
|
||||||
// newline not.
|
// newline does not.
|
||||||
Token::Space(newlines) => if newlines >= 2 {
|
Token::Space(newlines) => if newlines >= 2 {
|
||||||
Node::Parbreak
|
Node::Parbreak
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user