mikitex70 / plantuml-markdown

PlantUML plugin for Python-Markdown
BSD 2-Clause "Simplified" License
198 stars 55 forks source link

Mistype in README.md: wrong configuration key server_kroki used instead of correct kroki_server #99

Closed elyulka closed 5 months ago

elyulka commented 5 months ago

It's here https://github.com/mikitex70/plantuml-markdown/blob/aeb0f5a00cafc75a60e01dd780751bbd523ef4b4/README.md?plain=1#L203C45-L203C57

The configuration is similar, only use the `server_kroki` configuration property instead of the `server` property.

Following current documentation leads to the error:

mkdocs-1      | Aborted with a configuration error!
mkdocs-1      | ERROR   -  Config value 'markdown_extensions': Failed to load extension 'plantuml_markdown'.
mkdocs-1      |   File "/usr/local/lib/python3.11/site-packages/mkdocs/config/config_options.py", line 1031, in run_validation
mkdocs-1      |     md.registerExtensions((ext,), self.configdata)
mkdocs-1      |   File "/usr/local/lib/python3.11/site-packages/markdown/core.py", line 179, in registerExtensions
mkdocs-1      |     ext = self.build_extension(ext, configs.get(ext, {}))
mkdocs-1      |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
mkdocs-1      |   File "/usr/local/lib/python3.11/site-packages/markdown/core.py", line 219, in build_extension
mkdocs-1      |     return ext(**configs)
mkdocs-1      |            ^^^^^^^^^^^^^^
mkdocs-1      |   File "/usr/local/lib/python3.11/site-packages/plantuml_markdown/plantuml_markdown.py", line 668, in __init__
mkdocs-1      |     super(PlantUMLMarkdownExtension, self).__init__(**kwargs)
mkdocs-1      |   File "/usr/local/lib/python3.11/site-packages/markdown/extensions/__init__.py", line 58, in __init__
mkdocs-1      |     self.setConfigs(kwargs)
mkdocs-1      |   File "/usr/local/lib/python3.11/site-packages/markdown/extensions/__init__.py", line 130, in setConfigs
mkdocs-1      |     self.setConfig(key, value)
mkdocs-1      |   File "/usr/local/lib/python3.11/site-packages/markdown/extensions/__init__.py", line 109, in setConfig
mkdocs-1      |     if isinstance(self.config[key][0], bool):
mkdocs-1      |                   ~~~~~~~~~~~^^^^^
mkdocs-1      | KeyError: 'server_kroki'
mikitex70 commented 5 months ago

Hi @elyulka, I've fixed the README.md. Thank you for report.