<commit_before>class Pandoc < Formula
  desc "Swiss-army knife of markup format conversion"
  homepage "https://pandoc.org/"
  url "https://hackage.haskell.org/package/pandoc-2.19/pandoc-2.19.tar.gz"
  sha256 "425c13728b4e158deb54996b6bd57bc71120af39f6d01a12b9c0ec21e8121cbf"
  license "GPL-2.0-or-later"
  head "https://github.com/jgm/pandoc.git", branch: "master"

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_monterey: "9411a015436638767a62eefe22891228dfc00ee5ab3d1469637f65a83bf07f3b"
    sha256 cellar: :any_skip_relocation, arm64_big_sur:  "77318c0209980baad255423e1eefbef40d696be949770be3d189554bffab3d64"
    sha256 cellar: :any_skip_relocation, monterey:       "2c975ede0463a4135548342e436d073a724c3643186a1daa6417855261f5407b"
    sha256 cellar: :any_skip_relocation, big_sur:        "87fcbed2bd56b65fd815197048e4926abeed631e35dc4770b9b3a1e3049eb285"
    sha256 cellar: :any_skip_relocation, catalina:       "79354a16ef3a9ab20d9911f97cce261a039ad5109bd2f134c96e0febdf5414be"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "f5925683a5d57816ea6da9eed054063fa3cba5863282c912162622d56e1c53d6"
  end

  depends_on "cabal-install" => :build
  depends_on "ghc" => :build

  uses_from_macos "unzip" => :build # for cabal install
  uses_from_macos "zlib"

  def install
    system "cabal", "v2-update"
    system "cabal", "v2-install", *std_cabal_v2_args
    (bash_completion/"pandoc").write `#{bin}/pandoc --bash-completion`
    man1.install "man/pandoc.1"
  end

  test do
    input_markdown = <<~EOS
      # Homebrew

      A package manager for humans. Cats should take a look at Tigerbrew.
    EOS
    expected_html = <<~EOS
      <h1 id="homebrew">Homebrew</h1>
      <p>A package manager for humans. Cats should take a look at<commit_msg>pandoc: update 2.19 bottle.<commit_after>class Pandoc < Formula
  desc "Swiss-army knife of markup format conversion"
  homepage "https://pandoc.org/"
  url "https://hackage.haskell.org/package/pandoc-2.19/pandoc-2.19.tar.gz"
  sha256 "425c13728b4e158deb54996b6bd57bc71120af39f6d01a12b9c0ec21e8121cbf"
  license "GPL-2.0-or-later"
  head "https://github.com/jgm/pandoc.git", branch: "master"

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_monterey: "ede8d65a434f7b294023443771640021c8b40afccd3c804b5b262b2d2b721854"
    sha256 cellar: :any_skip_relocation, arm64_big_sur:  "d52f8dcc504ff2e565653ef023f840c419eeac85436714a85da6344d286f2e57"
    sha256 cellar: :any_skip_relocation, monterey:       "b2fb57aab492032e90d0ea1337e58198e4416bdf68be44ba229f9a49944592a2"
    sha256 cellar: :any_skip_relocation, big_sur:        "82d59a8f0096eab082ccdabe3f0e8f86cd497e8c3486e34ac03b594a6d59ae7d"
    sha256 cellar: :any_skip_relocation, catalina:       "802806318075e80fd0040f4e1736f9b662a9ce84bacacfad59a91c2c876bd20a"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "985ae6f79a2da8229695b7e904a1fa16aaae30e9c3ca5a9159233f14a16878c6"
  end

  depends_on "cabal-install" => :build
  depends_on "ghc" => :build

  uses_from_macos "unzip" => :build # for cabal install
  uses_from_macos "zlib"

  def install
    system "cabal", "v2-update"
    system "cabal", "v2-install", *std_cabal_v2_args
    (bash_completion/"pandoc").write `#{bin}/pandoc --bash-completion`
    man1.install "man/pandoc.1"
  end

  test do
    input_markdown = <<~EOS
      # Homebrew

      A package manager for humans. Cats should take a look at Tigerbrew.
    EOS
    expected_html = <<~EOS
      <h1 id="homebrew">Homebrew</h1>
      <p>A package manager for humans. Cats should take a look at
{'fraction_non_alphanumeric': 0.09200900393922341, 'fraction_numerical': 0.18851997749015195, 'mean_word_length': 4.827868852459017, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 15, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7440151', 'n_tokens_mistral': 1885, 'n_tokens_neox': 1518, 'n_words': 236}