Skip to content

Commit 8055835

Browse files
Merge pull request #882 from doctrine/rst-highlighting
Add rst code highlighting
2 parents a0d3b76 + 0c9f634 commit 8055835

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/Docs/CodeBlockLanguageDetector.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,11 @@ public function detectLanguage(string $language, array $lines): string
5959
private function registerHighlighter(): void
6060
{
6161
$phpHighlightPath = sprintf('%s/vendor/scrivo/highlight.php/Highlight/languages/php.json', $this->rootDir);
62+
$rstHighlightPath = sprintf('%s/vendor/scrivo/highlight.php/Highlight/languages/plaintext.json', $this->rootDir);
6263
Highlighter::registerLanguage('annotation', $phpHighlightPath);
6364
Highlighter::registerLanguage('php-annotations', $phpHighlightPath);
6465
Highlighter::registerLanguage('attribute', $phpHighlightPath);
6566
Highlighter::registerLanguage('php-attributes', $phpHighlightPath);
67+
Highlighter::registerLanguage('rst', $rstHighlightPath);
6668
}
6769
}

0 commit comments

Comments
 (0)