fralau / mkdocs-macros-plugin

Create richer and more beautiful pages in MkDocs, by using variables and calls to macros in the markdown code.
https://mkdocs-macros-plugin.readthedocs.io
Other
321 stars 50 forks source link

Cannot reassign env.raw_markdown property #98

Closed sgilson closed 2 years ago

sgilson commented 2 years ago

Based on the docs here: https://github.com/fralau/mkdocs_macros_plugin/blame/master/webdoc/docs/advanced.md#L657-L659, it sounds like users have the opportunity to modify the interpreted markdown using the raw_markdown property, but attempting to reassign the property causes an AttributeError because it only has a getter: https://github.com/fralau/mkdocs_macros_plugin/blob/master/mkdocs_macros/plugin.py#L224.

I'd be willing to contribute a change to introduce a setter for the property.

The easy workaround is to instead modify env._raw_markdown, but this should probably not be encouraged.

github-actions[bot] commented 2 years ago

Welcome to this project and thank you!' first issue

fralau commented 2 years ago

Good point... yes, you are welcome to make a PR!