use v6.d;
use Test;
use RakuDoc::To::HTML;
my $html-instance = RakuDoc::To::HTML.new;
my $rdp := $html-instance.rdp;

plan 2;

lives-ok {
    require RakuDoc::Plugin::HTML::Hilite;
    RakuDoc::Plugin::HTML::Hilite.new.enable( $rdp );
}, 'hilite plugin enabled';

my $ast = q:to/CODE/.AST;
=begin rakudoc
=begin code
	=head2 X<C<hyper>|Syntax,hyper (statement prefix)>, X<C<race>|Syntax,race (statement prefix)>
=end code
=end rakudoc
CODE

my $rv = $html-instance.rdp.render( $ast, :pre-finalized ).body.Str;

like $rv, /
    '<label>Raku highlighting</label>' .+?
    '<span class="rainbow-operator">X</span>' .+?
    'hyper'
/, 'got Rainbow hilighting in code';

done-testing;
