Skip to content

Commit 0e03aef

Browse files
committed
Switch to kadet/keylighter for syntax highlighting
1 parent 11c72ff commit 0e03aef

File tree

9 files changed

+171
-84
lines changed

9 files changed

+171
-84
lines changed

app/config.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
use Colors\Color;
44
use function DI\object;
55
use function DI\factory;
6+
use Kadet\Highlighter\KeyLighter;
67
use function PhpSchool\PhpWorkshop\Event\containerListener;
78
use Interop\Container\ContainerInterface;
89
use League\CommonMark\DocParser;
@@ -312,11 +313,15 @@ function (CgiResult $result) use ($c) {
312313
$c->get(Color::class),
313314
$c->get(TerminalInterface::class),
314315
$c->get(ExerciseRepository::class),
315-
$c->get(SyntaxHighlighter::class),
316+
$c->get(KeyLighter::class),
316317
$c->get(ResultRendererFactory::class)
317318
);
318319
},
319320

321+
KeyLighter::class => function () {
322+
return new KeyLighter;
323+
},
324+
320325
'coreContributors' => [
321326
'@AydinHassan' => 'Aydin Hassan',
322327
'@mikeymike' => 'Michael Woodward',

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
"psr/http-message": "^1.0",
3131
"zendframework/zend-diactoros": "^1.3.6",
3232
"myclabs/php-enum": "^1.4",
33-
"nikic/php-parser": "^2.1"
33+
"nikic/php-parser": "^2.1",
34+
"kadet/keylighter": "^0.8.2"
3435
},
3536
"require-dev": {
3637
"composer/composer": "^1.2",

0 commit comments

Comments
 (0)