Closed andynameistaken closed 5 months ago
Hello, thanks for the feature request!
I initially didn't want to implement such a feature, but it could be very easy with an environment variable, so why not.
Basically something like
EXEC_AUTO = [lang.strip() for lang in os.getenv("MARKDOWN_EXEC_AUTO", "").split(",")]
# and in our validator
exec_value = (language in EXEC_AUTO) | _to_bool(inputs.pop("exec", "no"))
Happy to review a PR with these changes, otherwise I'll try to get to it soon :slightly_smiling_face:
Could you put it inside when you have time? I never did PR in my life and I don't know how to do it (yet).
I'm using Code Emiter plugin for Obsidian which allows me to run code from code blocks, when I'm writing notes which I later publish to
mkdocs
with material theme. Could you provide option for default behaviour for codeblocks?Example:
Block with
exec=on
doesn't allow Code emitter to run