Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

executable file 43 lines (39 sloc) 1.11 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
--TEST--
Check for determine enabled extensions.
--SKIPIF--
<?php if (!extension_loaded("sundown")) print "skip"; ?>
--FILE--
<?php
$render = new Sundown\Render\HTML();

$extensions = array("no_intra_emphasis","tables","fenced_code_blocks","autolink","strikethrough","lax_html_blocks","space_after_header","superscript");
$enabled = array();
foreach ($extensions as $ext) {
  $enabled[$ext] = true;
}

$markdown = new Sundown\Markdown($render, $enabled);
foreach ($markdown->getExtensions() as $ext_name => $ext_value) {
printf("%s => %d\n",$ext_name,$ext_value);
}

echo "# reference count check\n";
$markdown = new Sundown\Markdown($render, $enabled);
foreach ($markdown->getExtensions() as $ext_name => $ext_value) {
printf("%s => %d\n",$ext_name,$ext_value);
}

--EXPECT--
no_intra_emphasis => 1
tables => 1
fenced_code_blocks => 1
autolink => 1
strikethrough => 1
lax_html_blocks => 1
space_after_header => 1
superscript => 1
# reference count check
no_intra_emphasis => 1
tables => 1
fenced_code_blocks => 1
autolink => 1
strikethrough => 1
lax_html_blocks => 1
space_after_header => 1
superscript => 1
Something went wrong with that request. Please try again.