Skip to content

Commit e852f14

Browse files
committed
Enhancement: Add caddy
Follows * symfony-tools/docs-builder#153
1 parent 5c40ed2 commit e852f14

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/Rst/RstParser.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ class RstParser
101101
public const CODE_BLOCK_VARNISH_3 = 'varnish3';
102102
public const CODE_BLOCK_VARNISH_4 = 'varnish4';
103103
public const CODE_BLOCK_APACHE = 'apache';
104+
public const CODE_BLOCK_CADDY = 'caddy';
104105

105106
public static function isPhpDirective(Line $line): bool
106107
{

tests/Rst/RstParserTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ public static function directiveIsProvider(): \Generator
230230
yield [true, '.. code-block:: rst', RstParser::DIRECTIVE_CODE_BLOCK];
231231
yield [true, ' .. code-block:: php', RstParser::DIRECTIVE_CODE_BLOCK];
232232
yield [true, '.. code-block:: php-annotations', RstParser::DIRECTIVE_CODE_BLOCK];
233+
yield [true, '.. code-block:: caddy', RstParser::DIRECTIVE_CODE_BLOCK];
233234
yield [false, 'foo', RstParser::DIRECTIVE_CODE_BLOCK];
234235
}
235236

@@ -258,6 +259,7 @@ public static function codeBlockDirectiveIsTypeOfProvider(): \Generator
258259
yield [true, ' .. code-block:: php-standalone', RstParser::CODE_BLOCK_PHP_STANDALONE];
259260
yield [true, ' .. code-block:: text', RstParser::CODE_BLOCK_TEXT];
260261
yield [true, ' .. code-block:: rst', RstParser::CODE_BLOCK_RST];
262+
yield [true, ' .. code-block:: caddy', RstParser::CODE_BLOCK_CADDY];
261263
yield [false, 'foo', RstParser::CODE_BLOCK_PHP];
262264
yield [true, ' .. code-block:: php', RstParser::CODE_BLOCK_PHP, true];
263265
yield [true, ' .. code-block:: php-annotations', RstParser::CODE_BLOCK_PHP_ANNOTATIONS, false];

0 commit comments

Comments
 (0)