Skip to content

Commit

Permalink
fix(ssg): 📝 fixing error: doc list item without indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastienrousseau committed Sep 9, 2024
1 parent 666a489 commit c7025e6
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/cmd/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ use clap::{Arg, ArgMatches, Command, Error};
/// # Returns
///
/// * `Result<ArgMatches, Error>` - A struct containing the parsed
/// command-line arguments and their values, or an error if the
/// arguments could not be parsed.
/// command-line arguments and their values, or an error if the arguments
/// could not be parsed.
///
/// # Examples
///
Expand Down
24 changes: 13 additions & 11 deletions src/cmd/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,30 @@ use std::path::Path;
/// command-line tool (ssg) and compiles the project.
///
/// - This function parses the `content` directory where the markdown files for
/// your website are stored and the `output` directory where the compiled site
/// will be created from the `matches` object.
/// your website are stored and the `output` directory where the compiled
/// site will be created from the `matches` object.
///
/// - It then, validates that these directories exist, or creates them on the
/// fly if they do not. If either directory cannot be found or created, an
/// error is returned.
/// fly if they do not. If either directory cannot be found or created, an
/// error is returned.
///
/// - Finally, it calls the `compile` function to create the new project using
/// the markdown files in the "content" directory, and returns an error if the
/// compilation process fails.
/// the markdown files in the "content" directory, and returns an error if
/// the compilation process fails.
///
/// # Arguments
///
/// * `matches` - A reference to an ArgMatches object containing the command-
/// line arguments passed to the tool. This is created by the `clap` crate.
/// * `matches` - A reference to an ArgMatches object containing the
/// command-line arguments passed to the tool. This is created by the `clap`
/// crate.
///
/// # Returns
///
/// * A Result indicating success or failure.
/// - Ok() if the project was created successfully and the output files were
/// written to the output directory.
/// - Err(anyhow::Error) if the project could not be created or the output files
/// - Ok() if the project was created successfully and the output files were
/// written to the output directory.

Check failure on line 36 in src/cmd/process.rs

View workflow job for this annotation

GitHub Actions / Lint

doc list item without indentation
/// - Err(anyhow::Error) if the project could not be created or the output
/// files

Check failure on line 38 in src/cmd/process.rs

View workflow job for this annotation

GitHub Actions / Lint

doc list item without indentation
/// could not be written to the output directory.

Check failure on line 39 in src/cmd/process.rs

View workflow job for this annotation

GitHub Actions / Lint

doc list item without indentation
///
pub fn args(matches: &ArgMatches) -> Result<(), String> {
Expand Down
2 changes: 1 addition & 1 deletion src/modules/frontmatter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ pub fn extract_front_matter_str<'a>(
/// ### Returns
///
/// A `Yaml` object representing the front matter string. If the front
/// matter string is not valid YAML, an error is returned.
/// matter string is not valid YAML, an error is returned.
///
pub fn parse_yaml_document(
front_matter_str: &str,
Expand Down

0 comments on commit c7025e6

Please sign in to comment.