<commit_before>{ lib, stdenv, fetchgit, perl }:

stdenv.mkDerivation {
  pname = "multimarkdown";
  version = "4.7.1";

  src = fetchgit {
    url = "https://github.com/fletcher/MultiMarkdown-4.git";
    fetchSubmodules = true;
    rev = "dd060247518715ef2b52be22b8f49d0e6d2c3a8b";
    sha256 = "11f246r30q2fx4xw7valhqjj4mc4ydj5fv5f2kbl5h93y69q0bw7";
  };

  preBuild = ''
    substituteInPlace enumsToPerl.pl --replace "/usr/bin/perl" "${perl}/bin/perl"
  '';

  buildInputs = [ stdenv ];
  checkPhase = "make test-all";
  installPhase = "make pkg-install prefix='' DESTDIR=$out; make pkg-install-scripts prefix='' DESTDIR=$out";

  meta = with lib; {
    description = "A derivative of Markdown that adds new syntax features";
    longDescription = ''
      MultiMarkdown is a lightweight markup language created by
      <NAME> and based on Markdown, which supports
      more export-formats (html, latex, beamer, memoir, odf, opml,
      lyx, mmd) and implements some added features currently not
      available with plain Markdown syntax.

      It adds the following features to Markdown:

      footnotes
      tables
      citations and bibliography (works best in LaTeX using BibTeX)
      math support
      automatic cross-referencing ability
      smart typography, with support for multiple languages
      image attributes
      table and image captions
      definition lists
      glossary entries (LaTeX only)
      document metadata (e.g. title, author, date, etc.)
    '';
    homepage = "https://fletcherpenney.net/multimarkdown/";
    # licensed under GPLv2+ or MIT:
    # https://raw.githubusercontent.com/fletcher/MultiMarkdown-4/master/LICENSE
    license = with lib.licenses; [ gpl2Plus mit ];
    platforms = platforms.all;
    maintainers = with lib.maintainers; [ lowfatcomputing ];
  };
}<commit_msg>multimarkdown: 4.7.1 -> 6.6.0<commit_after>{ lib
, stdenv
, fetchFromGitHub
, cmake
, perl
, pkg-config
}:

stdenv.mkDerivation rec {
  pname = "multimarkdown";
  version = "6.6.0";

  src = fetchFromGitHub {
    owner = "fletcher";
    repo = "MultiMarkdown-6";
    rev = version;
    hash = "sha256-emJbY0wucoc/GdjlILoeqjwuwuPpTjXTqZN0gUKOyLg=";
  };

  postPatch = ''
    patchShebangs tools/enumsToPerl.pl
  '';

  nativeBuildInputs = [
    cmake
    perl
    pkg-config
  ];

  meta = with lib; {
    homepage = "https://fletcher.github.io/MultiMarkdown-6/introduction.html";
    description = "A derivative of Markdown that adds new syntax features";
    longDescription = ''
      MultiMarkdown is a lightweight markup language created by
      <NAME> and based on Markdown, which supports
      more export-formats (html, latex, beamer, memoir, odf, opml,
      lyx, mmd) and implements some added features currently not
      available with plain Markdown syntax.

      It adds the following features to Markdown:

      - footnotes
      - tables
      - citations and bibliography (works best in LaTeX using BibTeX)
      - math support
      - automatic cross-referencing ability
      - smart typography, with support for multiple languages
      - image attributes
      - table and image captions
      - definition lists
      - glossary entries (LaTeX only)
      - document metadata (e.g. title, author, date, etc.)
    '';
    license = with licenses; [ mit ];
    platforms = platforms.all;
    maintainers = with maintainers; [ AndersonTorres ];
  };
}
{'fraction_non_alphanumeric': 0.09606345475910694, 'fraction_numerical': 0.02144535840188014, 'mean_word_length': 3.00117508813161, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, 'https://': 4, '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': '6953322', 'n_tokens_mistral': 1135, 'n_tokens_neox': 1066, 'n_words': 303}