# frozen_string_literal: true

# Homebrew formula for markdown-reader (the `markdown-tui-explorer` crate's
# binary). Generated by scripts/render-homebrew-formula.sh on every release.
# Do not edit by hand — edit the template, not the output.

class MarkdownReader < Formula
  desc "Terminal-based markdown viewer with mermaid rendering, syntax highlighting, and live reload"
  homepage "https://github.com/leboiko/markdown-reader"
  version "{{VERSION}}"
  license "MIT"

  on_macos do
    on_arm do
      url "{{URL_AARCH64_DARWIN}}"
      sha256 "{{SHA256_AARCH64_DARWIN}}"
    end
    on_intel do
      url "{{URL_X86_64_DARWIN}}"
      sha256 "{{SHA256_X86_64_DARWIN}}"
    end
  end

  on_linux do
    on_arm do
      url "{{URL_AARCH64_LINUX_GNU}}"
      sha256 "{{SHA256_AARCH64_LINUX_GNU}}"
    end
    on_intel do
      url "{{URL_X86_64_LINUX_GNU}}"
      sha256 "{{SHA256_X86_64_LINUX_GNU}}"
    end
  end

  def install
    bin.install "markdown-reader"
  end

  test do
    assert_match "markdown-reader", shell_output("#{bin}/markdown-reader --help")
  end
end
