<commit_before>class PandocCrossref < Formula
  desc "Pandoc filter for numbering and cross-referencing"
  homepage "https://github.com/lierdakil/pandoc-crossref"
  url "https://hackage.haskell.org/package/pandoc-crossref-0.3.11.0/pandoc-crossref-0.3.11.0.tar.gz"
  sha256 "13b242e408dfe6dc92c868f5025626b3e882b31d9fd22e635165dfd22f29ffb3"
  license "GPL-2.0-or-later"

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_big_sur: "516ff01abd57816446425c2ed1fb9af61921b36ec6a1e8f7299ad3c0853624ce"
    sha256 cellar: :any_skip_relocation, big_sur:       "42d899a340c57df84dad28e52a1e3eeb91520c6842be17bb6fe29ac99b5cfbd8"
    sha256 cellar: :any_skip_relocation, catalina:      "ad0bee2803a212f0447be6071d64ddfb83a89265e82fc225d18bbe06e5467167"
    sha256 cellar: :any_skip_relocation, mojave:        "ba49887843f71a964526ae9d00101250c77fe8f80432f92627dbde5b37640243"
  end

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

  uses_from_macos "unzip" => :build
  uses_from_macos "zlib"

  def install
    system "cabal", "v2-update"
    system "cabal", "v2-install", *std_cabal_v2_args
  end

  test do
    (testpath/"hello.md").write <<~EOS
      Demo for pandoc-crossref.
      See equation @eq:eqn1 for cross-referencing.
      Display equations are labelled and numbered

      $$ P_i(x) = \\sum_i a_i x^i $$ {#eq:eqn1}
    EOS
    system Formula["pandoc"].bin/"pandoc", "-F", bin/"pandoc-crossref", "-o", "out.html", "hello.md"
    assert_match "∑", (testpath/"out.html").read
  end
end
<commit_msg>pandoc-crossref 0.3.12.0<commit_after>class PandocCrossref < Formula
  desc "Pandoc filter for numbering and cross-referencing"
  homepage "https://github.com/lierdakil/pandoc-crossref"
  url "https://hackage.haskell.org/package/pandoc-crossref-0.3.12.0/pandoc-crossref-0.3.12.0.tar.gz"
  sha256 "5f1fc6a1755488477448f4df82869b05f3cf21f7d2f0b08ef951be652e0d2979"
  license "GPL-2.0-or-later"

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_big_sur: "516ff01abd57816446425c2ed1fb9af61921b36ec6a1e8f7299ad3c0853624ce"
    sha256 cellar: :any_skip_relocation, big_sur:       "42d899a340c57df84dad28e52a1e3eeb91520c6842be17bb6fe29ac99b5cfbd8"
    sha256 cellar: :any_skip_relocation, catalina:      "ad0bee2803a212f0447be6071d64ddfb83a89265e82fc225d18bbe06e5467167"
    sha256 cellar: :any_skip_relocation, mojave:        "ba49887843f71a964526ae9d00101250c77fe8f80432f92627dbde5b37640243"
  end

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

  uses_from_macos "unzip" => :build
  uses_from_macos "zlib"

  def install
    system "cabal", "v2-update"
    system "cabal", "v2-install", *std_cabal_v2_args
  end

  test do
    (testpath/"hello.md").write <<~EOS
      Demo for pandoc-crossref.
      See equation @eq:eqn1 for cross-referencing.
      Display equations are labelled and numbered

      $$ P_i(x) = \\sum_i a_i x^i $$ {#eq:eqn1}
    EOS
    system Formula["pandoc"].bin/"pandoc", "-F", bin/"pandoc-crossref", "-o", "out.html", "hello.md"
    assert_match "∑", (testpath/"out.html").read
  end
end

{'fraction_non_alphanumeric': 0.11307420494699646, 'fraction_numerical': 0.15644073241246387, 'mean_word_length': 4.501766784452297, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 5, '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': '485652', 'n_tokens_mistral': 1593, 'n_tokens_neox': 1334, 'n_words': 201}