Skip to content

Commit

Permalink
docs: Enable lang class and automatic inline highlight
Browse files Browse the repository at this point in the history
  • Loading branch information
pawamoy committed Feb 27, 2024
1 parent 21380ae commit cdd946c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/usage/handlers.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Additional options are available:
- [x] `show_submodules`: Whether to render submodules of a module when iterating on children.
Default: `False`.
- [x] `docstring_section_style`: The style to use to render docstring sections such as attributes,
parameters, etc. Available styles: `table` (default), `list` and `spacy`. The SpaCy style
parameters, etc. Available styles: `"table"` (default), `"list"` and `"spacy"`. The SpaCy style
is a poor implementation of their [table style](https://spacy.io/api/doc/#init).
We are open to improvements through PRs!

Expand Down
4 changes: 4 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ markdown_extensions:
- pymdownx.emoji:
emoji_index: !!python/name:material.extensions.emoji.twemoji
emoji_generator: !!python/name:material.extensions.emoji.to_svg
- pymdownx.highlight:
pygments_lang_class: true
- pymdownx.inlinehilite:
style_plain_text: python
- pymdownx.magiclink
- pymdownx.snippets:
base_path: [!relative $config_dir]
Expand Down
2 changes: 1 addition & 1 deletion src/mkdocstrings/extension.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""This module holds the code of the Markdown extension responsible for matching "autodoc" instructions.
The extension is composed of a Markdown [block processor](https://python-markdown.github.io/extensions/api/#blockparser)
that matches indented blocks starting with a line like '::: identifier'.
that matches indented blocks starting with a line like `::: identifier`.
For each of these blocks, it uses a [handler][mkdocstrings.handlers.base.BaseHandler] to collect documentation about
the given identifier and render it with Jinja templates.
Expand Down

0 comments on commit cdd946c

Please sign in to comment.