Skip to content

Commit

Permalink
refactor: Fetch plugin languages from dict
Browse files Browse the repository at this point in the history
  • Loading branch information
pawamoy committed May 9, 2022
1 parent c265bee commit de8309e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/markdown_exec/mkdocs_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
from mkdocs.config import Config, config_options
from mkdocs.plugins import BasePlugin

from markdown_exec import formatter, validator
from markdown_exec import formatter, formatters, validator


class MarkdownExecPlugin(BasePlugin):
"""MkDocs plugin to easily enable custom fences for code blocks execution."""

config_scheme = (("languages", config_options.Type(list, default=["py", "python", "pycon", "md", "markdown"])),)
config_scheme = (("languages", config_options.Type(list, default=list(formatters.keys()))),)

def on_config(self, config: Config, **kwargs) -> Config: # noqa: D102
self.languages = self.config["languages"]
Expand Down

0 comments on commit de8309e

Please sign in to comment.