Fix some comments (#3541)

Signed-off-by: geekvest <cuimoman@sohu.com>
This commit is contained in:
geekvest 2024-03-03 22:50:19 +08:00 committed by GitHub
parent 4f1d97253d
commit 098ef5acbb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 10 additions and 10 deletions

View File

@ -358,7 +358,7 @@ pub fn symbols(stream: BoundaryStream) -> BoundaryStream {
/// - `#[time(span = ..)]` to record the span, which will be used for the /// - `#[time(span = ..)]` to record the span, which will be used for the
/// `EventKey`. /// `EventKey`.
/// ///
/// By default, all tracing is ommited using the `wasm32` target flag. /// By default, all tracing is omitted using the `wasm32` target flag.
/// This is done to avoid bloating the web app which doesn't need tracing. /// This is done to avoid bloating the web app which doesn't need tracing.
/// ///
/// ```ignore /// ```ignore

View File

@ -1279,7 +1279,7 @@ impl<T> Deduplicator<T> {
}) })
} }
/// Iterate over the the elements alongside their ids. /// Iterate over the elements alongside their ids.
fn iter(&self) -> impl Iterator<Item = (Id, &T)> { fn iter(&self) -> impl Iterator<Item = (Id, &T)> {
self.vec self.vec
.iter() .iter()

View File

@ -1271,7 +1271,7 @@ node! {
} }
impl<'a> Spread<'a> { impl<'a> Spread<'a> {
/// The spreaded expression. /// The spread expression.
/// ///
/// This should only be accessed if this `Spread` is contained in an /// This should only be accessed if this `Spread` is contained in an
/// `ArrayItem`, `DictItem`, or `Arg`. /// `ArrayItem`, `DictItem`, or `Arg`.

View File

@ -1161,7 +1161,7 @@ fn array_or_dict_item(p: &mut Parser, state: &mut GroupState) {
let m = p.marker(); let m = p.marker();
if p.eat_if(SyntaxKind::Dots) { if p.eat_if(SyntaxKind::Dots) {
// Parses a spreaded item: `..item`. // Parses a spread item: `..item`.
code_expr(p); code_expr(p);
p.wrap(m, SyntaxKind::Spread); p.wrap(m, SyntaxKind::Spread);
state.maybe_just_parens = false; state.maybe_just_parens = false;
@ -1249,7 +1249,7 @@ fn args(p: &mut Parser) {
fn arg<'s>(p: &mut Parser<'s>, seen: &mut HashSet<&'s str>) { fn arg<'s>(p: &mut Parser<'s>, seen: &mut HashSet<&'s str>) {
let m = p.marker(); let m = p.marker();
// Parses a spreaded argument: `..args`. // Parses a spread argument: `..args`.
if p.eat_if(SyntaxKind::Dots) { if p.eat_if(SyntaxKind::Dots) {
code_expr(p); code_expr(p);
p.wrap(m, SyntaxKind::Spread); p.wrap(m, SyntaxKind::Spread);

View File

@ -181,7 +181,7 @@ impl Selector {
Self::Or(others.into_iter().chain(Some(self)).collect()) Self::Or(others.into_iter().chain(Some(self)).collect())
} }
/// Selects all elements that match this and all of the the other selectors. /// Selects all elements that match this and all of the other selectors.
#[func] #[func]
pub fn and( pub fn and(
self, self,

View File

@ -25,7 +25,7 @@ use crate::introspection::Location;
/// ///
/// - On the first page the query for all headings before the current location /// - On the first page the query for all headings before the current location
/// yields an empty array: There are no previous headings. We check for this /// yields an empty array: There are no previous headings. We check for this
/// case and and just display "Typst Academy". /// case and just display "Typst Academy".
/// ///
/// - For the second page, we retrieve the last element from the query's result. /// - For the second page, we retrieve the last element from the query's result.
/// This is the latest heading before the current position and as such, it is /// This is the latest heading before the current position and as such, it is

View File

@ -8,7 +8,7 @@ use crate::foundations::{repr, ty, Repr};
use crate::layout::Abs; use crate::layout::Abs;
use crate::util::{Numeric, Scalar}; use crate::util::{Numeric, Scalar};
/// Defines how the the remaining space in a layout is distributed. /// Defines how the remaining space in a layout is distributed.
/// ///
/// Each fractionally sized element gets space based on the ratio of its /// Each fractionally sized element gets space based on the ratio of its
/// fraction to the sum of all fractions. /// fraction to the sum of all fractions.

View File

@ -920,7 +920,7 @@ fn nbsp_delta(font: &Font) -> Option<Em> {
Some(font.advance(nbsp)? - font.advance(space)?) Some(font.advance(nbsp)? - font.advance(space)?)
} }
/// Process the language and and region of a style chain into a /// Process the language and region of a style chain into a
/// rustybuzz-compatible BCP 47 language. /// rustybuzz-compatible BCP 47 language.
fn language(styles: StyleChain) -> rustybuzz::Language { fn language(styles: StyleChain) -> rustybuzz::Language {
let mut bcp: EcoString = TextElem::lang_in(styles).as_str().into(); let mut bcp: EcoString = TextElem::lang_in(styles).as_str().into();

View File

@ -12,7 +12,7 @@ use crate::World;
/// ///
/// The XML file is parsed into an array of dictionaries and strings. XML nodes /// The XML file is parsed into an array of dictionaries and strings. XML nodes
/// can be elements or strings. Elements are represented as dictionaries with /// can be elements or strings. Elements are represented as dictionaries with
/// the the following keys: /// the following keys:
/// ///
/// - `tag`: The name of the element as a string. /// - `tag`: The name of the element as a string.
/// - `attrs`: A dictionary of the element's attributes as strings. /// - `attrs`: A dictionary of the element's attributes as strings.