Skip to content

Commit

Permalink
Add support for md4c (#1026)
Browse files Browse the repository at this point in the history
  • Loading branch information
mlocati authored Dec 2, 2024
1 parent 2d16d8b commit e03402c
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
1 change: 1 addition & 0 deletions data/supported-extensions
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ lzf 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4
mailparse 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4
maxminddb 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4
mcrypt 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3
md4c 8.0 8.1 8.2 8.3 8.4
memcache 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4
memcached 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4
memprof 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4
Expand Down
27 changes: 27 additions & 0 deletions scripts/tests/md4c
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env php
<?php

require_once __DIR__ . '/_bootstrap.php';

if (!function_exists('md4c_toHtml')) {
fwrite(STDERR, "The function md4c_toHtml() does not exist\n");
exit(1);
}

$input = "# Test\n";
$expected = "<h1>Test</h1>\n";
$actual = md4c_toHtml($input);

if ($actual !== $expected) {
fwrite(
STDERR,
<<<EOT
Failed to convert {$input}
Expected: {$expected}
Actual : {$actual}
EOT
);
exit(1);
}
echo "md4c_toHtml() works just fine.\n";

0 comments on commit e03402c

Please sign in to comment.