diff --git a/test-server.php b/test-server.php index dfa6ee0..7e6f11a 100644 --- a/test-server.php +++ b/test-server.php @@ -2,4 +2,6 @@ require_once __DIR__ . '/vendor/autoload.php'; -passthru("php -S localhost:8000 -t tests/"); \ No newline at end of file +$port = intval($argv[1] ?? 8000); + +passthru("php -S localhost:$port -t tests/"); diff --git a/tests/index.php b/tests/index.php index 5f2fede..e4d391d 100644 --- a/tests/index.php +++ b/tests/index.php @@ -12,6 +12,8 @@ use Tempest\Highlight\Highlighter; use Tempest\Highlight\Themes\CssTheme; +$tests = glob("./targets/*.md"); + $environment = new Environment(); $highlighter = (new Highlighter(new CssTheme())); @@ -24,7 +26,7 @@ $markdown = new MarkdownConverter($environment); -$target = 'targets' . DIRECTORY_SEPARATOR . 'test.md'; +$target = 'targets' . DIRECTORY_SEPARATOR . 'php.md'; if (isset($_GET['target'])) { $target = $_GET['target']; @@ -46,7 +48,7 @@ ?> - +
Paragraph one +
Paragraph two — the first <p> auto-closes +
Third with inline that doesn't break
& < > " ' © © © ©
Bare & ampersand, and 3 < 5 > 2 technically invalid but tolerated
&nonexistent; entity — parser should handle gracefully
Numeric edge:
HTML inside SVG foreignObject
Extra spaces in attributes
Is 5<10? And what about bold after?
Bare angle < and > in text
Deeply nested