Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo #268

Merged
merged 2 commits into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/csl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1412,7 +1412,7 @@ pub struct CitationRequest<'a, T: EntryLike> {
/// style.
pub locale: Option<LocaleCode>,
/// The files used to retrieve locale settings and terms if the style does
/// not define all neccessary items.
/// not define all necessary items.
pub locale_files: &'a [Locale],
/// The number to use for `first-reference-note-number`.
///
Expand Down Expand Up @@ -1488,7 +1488,7 @@ pub struct BibliographyRequest<'a> {
/// style.
pub locale: Option<LocaleCode>,
/// The files used to retrieve locale settings and terms if the style does
/// not define all neccessary items.
/// not define all necessary items.
pub locale_files: &'a [Locale],
}

Expand Down Expand Up @@ -1646,7 +1646,7 @@ impl<'a> StyleContext<'a> {
pub(crate) struct WritingContext {
// Dynamic settings that change while rendering.
/// Whether to watch out for punctuation that should be pulled inside the
/// preceeding quoted content.
/// preceding quoted content.
pull_punctuation: bool,
/// Whether we should be using inner quotes.
inner_quotes: bool,
Expand Down Expand Up @@ -1953,7 +1953,7 @@ impl WritingContext {
}

/// Return the sum of the lengths of strings in the finished elements. This
/// may not monotonoically increase.
/// may not monotonically increase.
fn len(&self) -> usize {
self.buf.len()
+ self
Expand Down Expand Up @@ -2034,7 +2034,7 @@ impl CertainCiteProperties {
}
}

/// Item properies that can only be determined after one or multiple renders.
/// Item properties that can only be determined after one or multiple renders.
/// These require validation.
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
struct SpeculativeCiteProperties<'a> {
Expand Down Expand Up @@ -2404,7 +2404,7 @@ impl<'a, T: EntryLike> Context<'a, T> {

if self.writing.strip_periods {
// Replicate citeproc.js behavior: remove a period if the
// preceeding character in the original string is not a period.
// preceding character in the original string is not a period.
let mut last_period = false;
for c in s.chars() {
let is_period = c == '.';
Expand Down Expand Up @@ -2518,7 +2518,7 @@ impl<'a, T: EntryLike> Context<'a, T> {
.unwrap_or_else(OrdinalLookup::empty)
}

/// Pull the next punctuation character into the preceeding quoted content
/// Pull the next punctuation character into the preceding quoted content
/// if appropriate for the locale.
fn may_pull_punctuation(&mut self) {
self.writing.pull_punctuation |= self.style.punctuation_in_quotes();
Expand Down
6 changes: 3 additions & 3 deletions src/csl/rendering/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ fn label_pluralization(
if let NumberOrPageVariable::Number(v) = label.variable {
n.is_plural(v.is_number_of_variable())
} else {
panic!("Incompatiable variable types")
panic!("Incompatible variable types")
}
}
NumberVariableResult::Transparent(_) => false,
Expand Down Expand Up @@ -815,12 +815,12 @@ fn choose_children<F, R, T: EntryLike>(
where
F: FnMut(&[LayoutRenderingElement], &mut Context<T>) -> R,
{
let supressed = ctx.writing.suppress_queried_variables;
let suppressed = ctx.writing.suppress_queried_variables;
ctx.writing.stop_suppressing_queried_variables();
let branch = choose
.branches()
.find(|branch| branch.match_.test(BranchConditionIter::from_branch(branch, ctx)));
ctx.writing.suppress_queried_variables = supressed;
ctx.writing.suppress_queried_variables = suppressed;

branch
.map(|b| b.children.as_slice())
Expand Down
2 changes: 1 addition & 1 deletion src/lang/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,7 @@ mod tests {
}

#[test]
fn title_case_name_detecion() {
fn title_case_name_detection() {
let mut props = TitleCase::new();
let case: Case = props.into();

Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,7 @@ impl Entry {
EntryType::Article => retrieve_container(&[
EntryType::Book,
// Proceedings must come before Conference.
// Because @inproceedings will result in a Artical entry with a Proceedings and a
// Because @inproceedings will result in a Article entry with a Proceedings and a
// Conference parent. But only the Proceedings has the correct title.
EntryType::Proceedings,
EntryType::Conference,
Expand Down
4 changes: 2 additions & 2 deletions src/types/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ pub enum EntryType {
/// conference.
#[serde(alias = "Proceedings")]
Proceedings,
/// Long-form work published pysically as a set of bound sheets.
/// Long-form work published physically as a set of bound sheets.
#[serde(alias = "Book")]
Book,
/// Set of self-published articles on a website.
Expand Down Expand Up @@ -304,7 +304,7 @@ pub enum DeserializationError {
ExpectedKey(&'static str),
}

/// A type that may be a string or a stricly typed value.
/// A type that may be a string or a strictly typed value.
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize, Eq, Hash)]
#[serde(untagged)]
pub enum MaybeTyped<T> {
Expand Down
2 changes: 1 addition & 1 deletion tests/archiver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ fn strip_id(full_id: &str) -> &str {

/// Map which styles are referenced by which dependent styles.
#[allow(dead_code)]
fn retrieve_dependent_aliasses() -> Result<HashMap<String, Vec<String>>, ArchivalError> {
fn retrieve_dependent_aliases() -> Result<HashMap<String, Vec<String>>, ArchivalError> {
let mut dependent_alias: HashMap<_, Vec<_>> = HashMap::new();
let style_path = PathBuf::from(CACHE_PATH).join(STYLES_REPO_NAME);
for path in iter_files(&style_path.join("dependent"), "csl") {
Expand Down