Fixed bug in Commonmark plugin

This commit is contained in:
Derick Rethans
2024-11-11 11:48:02 +00:00
parent 3bae2f9582
commit 01f680a0c6
3 changed files with 11 additions and 4 deletions

View File

@ -1,3 +1,10 @@
FROM php:8.2-apache FROM php:8.2-apache
RUN pecl install xdebug
RUN echo "zend_extension=xdebug" > /usr/local/etc/php/conf.d/99-xdebug.ini
RUN echo "xdebug.mode=debug" >> /usr/local/etc/php/conf.d/99-xdebug.ini
RUN echo "xdebug.client_host=xdebug://gateway" >> /usr/local/etc/php/conf.d/99-xdebug.ini
#RUN echo "xdebug.log=xdebug.log" >> /usr/local/etc/php/conf.d/99-xdebug.ini
#RUN echo "xdebug.log_level=11" >> /usr/local/etc/php/conf.d/99-xdebug.ini
RUN a2enmod rewrite RUN a2enmod rewrite

View File

@ -91,7 +91,7 @@ final class DWRenderer implements ChildNodeRendererInterface
return $result; return $result;
} }
} }
return "";
throw new \RuntimeException('Unable to find corresponding renderer for node type ' . \get_class($node)); throw new \RuntimeException('Unable to find corresponding renderer for node type ' . \get_class($node));
} }

View File

@ -1,4 +1,4 @@
<?php <?php
/* /*
* This file is part of the clockoon/dokuwiki-commonmark-plugin package. * This file is part of the clockoon/dokuwiki-commonmark-plugin package.
* *
@ -79,7 +79,7 @@ final class CommonMarkToDokuWikiExtension implements ConfigurableExtensionInterf
->addRenderer(InlineElement\HtmlInline::class, new InlineRenderer\HtmlInlineRenderer(), 0) ->addRenderer(InlineElement\HtmlInline::class, new InlineRenderer\HtmlInlineRenderer(), 0)
->addRenderer(InlineElement\Image::class, new InlineRenderer\ImageRenderer(), 0) ->addRenderer(InlineElement\Image::class, new InlineRenderer\ImageRenderer(), 0)
->addRenderer(InlineElement\Link::class, new InlineRenderer\LinkRenderer(), 0) ->addRenderer(InlineElement\Link::class, new InlineRenderer\LinkRenderer(), 0)
->addRenderer(InlineElement\Newline::class, new InlineRenderer\NewlineRenderer(), 0) ->addRenderer(CoreInlineElement\Newline::class, new InlineRenderer\NewlineRenderer(), 0)
->addRenderer(InlineElement\Strong::class, new InlineRenderer\StrongRenderer(), 0) ->addRenderer(InlineElement\Strong::class, new InlineRenderer\StrongRenderer(), 0)
->addRenderer(CoreInlineElement\Text::class, new InlineRenderer\TextRenderer(), 0) ->addRenderer(CoreInlineElement\Text::class, new InlineRenderer\TextRenderer(), 0)
; ;
@ -91,5 +91,5 @@ final class CommonMarkToDokuWikiExtension implements ConfigurableExtensionInterf
if ($environment->getConfiguration()->get('commonmark/use_underscore')) { if ($environment->getConfiguration()->get('commonmark/use_underscore')) {
$environment->addDelimiterProcessor(new EmphasisDelimiterProcessor('_')); $environment->addDelimiterProcessor(new EmphasisDelimiterProcessor('_'));
} }
} }
} }