Skip to content

Commit

Permalink
fix: whitespace in md generation
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Sep 28, 2024
1 parent cbe97cb commit 3cb7769
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cli/src/cli/generate/markdown.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ impl Markdown {
pub fn run(&self) -> miette::Result<()> {
let write = |path: &PathBuf, md: &str| -> miette::Result<()> {
println!("writing to {}", path.display());
xx::file::write(path, md)?;
xx::file::write(path, format!("{}\n", md.trim()))?;
Ok(())
};
let (spec, _) = Spec::parse_file(&self.file)?;
Expand Down
2 changes: 1 addition & 1 deletion lib/src/docs/markdown/templates/cmd_template.md.tera
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{%- if cmd.before_help_md %}{% set before_help = cmd.before_help_md %}{% elif cmd.before_help_long %}{% set before_help = cmd.before_help_long %}{% else %}{% set before_help = cmd.before_help %}{% endif %}
{%- if cmd.help_md %}{% set help = cmd.help_md %}{% elif cmd.help_long %}{% set help = cmd.help_long %}{% else %}{% set help = cmd.help %}{% endif %}
{%- if cmd.after_help_md %}{% set after_help = cmd.after_help_md %}{% elif cmd.after_help_long %}{% set after_help = cmd.after_help_long %}{% else %}{% set after_help = cmd.after_help %}{% endif %}
{%- if multi %}
{%- if multi -%}
{{ "#" | repeat(count=header_level) }} `{{ spec.bin }} {{ cmd.usage }}`
{%- endif %}
{%- if before_help %}
Expand Down
2 changes: 1 addition & 1 deletion tasks/bump-aur
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ USAGE_VERSION=v$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[
if [ ! -d "aur-$pkgname" ]; then
git clone "ssh://aur@aur.archlinux.org/$pkgname.git aur"
fi
git -C aur pull
git -C "aur-$pkgname" pull

if [ "$pkgname" == "usage" ]; then
SOURCE_SHA512=$(curl -fsSL "https://github.com/jdx/usage/archive/$USAGE_VERSION.tar.gz" | sha512sum | awk '{print $1}')
Expand Down

0 comments on commit 3cb7769

Please sign in to comment.