diff --git a/docs/formatters/biased.md b/docs/formatters/biased.md index 5e87f9a1..a09409a8 100644 --- a/docs/formatters/biased.md +++ b/docs/formatters/biased.md @@ -5,7 +5,11 @@ Generate a random `integer`, with a bias using a given function. ```php -function biasedNumberBetween(int $min = 0, int $max = 100, string $function = 'sqrt'): int; +function biasedNumberBetween( + int $min = 0, + int $max = 100, + string $function = 'sqrt' +): int; ``` Examples: diff --git a/docs/formatters/image.md b/docs/formatters/image.md index bba11aa0..9f4da1db 100644 --- a/docs/formatters/image.md +++ b/docs/formatters/image.md @@ -10,7 +10,7 @@ To provide a less verbose explanation of this function, we'll use a function def function imageUrl( int $width = 640, int $height = 480, - ?string $category = null, // used as text on the image + ?string $category = null, /* used as text on the image */ bool $randomize = true, ?string $word = null, bool $gray = false diff --git a/docs/javascripts/highlight.js b/docs/javascripts/highlight.js new file mode 100644 index 00000000..bed6d128 --- /dev/null +++ b/docs/javascripts/highlight.js @@ -0,0 +1,9 @@ +// Add a custom event listener, dispatched by Material for MkDocs. +// +document.addEventListener('DOMContentSwitch', () => { + // Reset the "called" boolean + hljs.initHighlighting.called = false; + hljs.initHighlighting(); +}); + +hljs.initHighlightingOnLoad(); diff --git a/mkdocs.yml b/mkdocs.yml index 52b01179..9ebbc64e 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -108,10 +108,14 @@ markdown_extensions: permalink: '#' - pymdownx.details: { } - pymdownx.highlight: - extend_pygments_lang: - - name: php - lang: php - options: - startinline: true + use_pygments: false - pymdownx.superfences: { } - pymdownx.keys: { } + +extra_javascript: + - https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.4.0/highlight.min.js + - javascripts/highlight.js + +# Themes can be found here: +extra_css: + - https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.4.0/styles/atom-one-dark-reasonable.min.css