Skip to content
Open
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
2 changes: 1 addition & 1 deletion deployment/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
},
"properties": {
"locked": {
"description": "Whether the configuration is not allowed to be overriden or extended.",
"description": "Whether the configuration is not allowed to be overridden or extended.",
"type": "boolean"
},
"lineWidth": {
Expand Down
4 changes: 2 additions & 2 deletions src/configuration/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ generate_str_to_from![StrongKind, [Asterisks, "asterisks"], [Underscores, "under
pub enum UnorderedListKind {
/// Uses dashes (-) as primary character for lists (default).
///
/// In this case, asterisks are used as alternate list chracters.
/// In this case, asterisks are used as alternate list characters.
Dashes,
/// Uses asterisks (*) as primary character for lists.
///
/// In this case, dashes are used as alternate list chracters.
/// In this case, dashes are used as alternate list characters.
Asterisks,
}

Expand Down
2 changes: 1 addition & 1 deletion src/format_text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ enum ParseFileResult<'a> {
}

fn parse_source_file<'a>(file_text: &'a str, config: &Configuration) -> Result<ParseFileResult<'a>> {
// check for the presence of an dprint-ignore-file comment before parsing
// check for the presence of a dprint-ignore-file comment before parsing
if file_has_ignore_file_directive(strip_metadata_header(file_text), &config.ignore_file_directive) {
return Ok(ParseFileResult::IgnoreFile);
}
Expand Down
2 changes: 1 addition & 1 deletion src/generation/cmark/parsing/parse_image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use super::parse_text_in_parens;
use crate::generation::common::*;
use pulldown_cmark::LinkType;

/// Crudely parses out an image assuming the text is a image.
/// Crudely parses out an image assuming the text is an image.
/// This is done because images have their references inlined by cmark.
pub fn parse_image(offset: usize, text: &str, link_type: LinkType) -> Result<Node, ParseError> {
let mut char_scanner = CharScanner::new(offset, text);
Expand Down
2 changes: 1 addition & 1 deletion src/generation/common/ast_nodes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ impl Node {
}
}

pub fn has_preceeding_space(&self, file_text: &str) -> bool {
pub fn has_preceding_space(&self, file_text: &str) -> bool {
let range = self.range();
if range.start == 0 {
false
Expand Down
6 changes: 3 additions & 3 deletions src/generation/generate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,15 +162,15 @@ fn gen_nodes(nodes: &[Node], context: &mut Context) -> PrintItems {
items.push_signal(Signal::NewLine);
} else {
let needs_space = if let Node::Html(_) = last_node {
node.has_preceeding_space(context.file_text)
node.has_preceding_space(context.file_text)
} else if matches!(last_node, Node::Text(_)) || matches!(node, Node::Text(_)) {
node.has_preceeding_space(context.file_text)
node.has_preceding_space(context.file_text)
|| !last_node.ends_with_punctuation(context.file_text)
&& !node.starts_with_punctuation(context.file_text)
} else if let Node::FootnoteReference(_) = node {
false
} else if let Node::Html(_) = node {
node.has_preceeding_space(context.file_text)
node.has_preceding_space(context.file_text)
} else {
true
};
Expand Down
4 changes: 2 additions & 2 deletions tests/specs/Text/Text_TextWrap_Always.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ testing this out with some text thatt 40)
testing this out with some text
thatt 40)

!! should not wrap a number with a dot on the end to the next line when preceeded by another node !!
!! should not wrap a number with a dot on the end to the next line when preceded by another node !!
testing this out with some text `tht` 40.

[expect]
testing this out with some text
`tht` 40.

!! should not wrap a number with a paren on the end to the next line when preceeded by another node !!
!! should not wrap a number with a paren on the end to the next line when preceded by another node !!
testing this out with some text `tht` 40)

[expect]
Expand Down