mikitex70 / plantuml-markdown

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

how suppress message after loading plantuml-markdown? #41

Closed poulpoulsen closed 4 years ago

poulpoulsen commented 4 years ago

hello, i use python-markdown as my markdown inside emacs. every preview contains the messages from python-markdown, that all modules successfully loaded.

here is the code: python3 -m markdown -x plantuml_markdown -x mdx_superscript -x mdx_subscript if i run that from shell without emacs, there are also the messages. that is annoying, because the generated html contains this.

is there a way to suppress it? i tried it with >/dev/null but with no luck.

Any ideas? Regards Poul

mikitex70 commented 4 years ago

I've never used python with emacs, I don't know how it works. But this seems to be more related to python-markdown than to the plugin. Try to use this command instead:

markdown_py -x plantuml_markdown -x mdx_superscript -x mdx_subscript

I've noticed that with this wrapper there are no import messages.

poulpoulsen commented 4 years ago

hello, i think you misunderstood. this message has nothing to do with emacs, because it also pops up in shell. And it only pops up, if i load plantuml. If i run the command above, the output is: Successfuly imported extension module "plantuml_markdown". Successfully loaded extension "plantuml_markdown.PlantUMLMarkdownExtension".

and this is annoying, because it is inserted in the resulting html file.

Any ideas? Regards Poul

mikitex70 commented 4 years ago

As I've wrote, this behaviour is not related to this plugin but on how works the python-markdown program. So maybe the python-markdown project is more appropriated for asking for help.

Said this, you wrote that you use a command like:

python3 -m markdown -x plantuml_markdown -x mdx_superscript -x mdx_subscript

Try using this kind of command:

markdown_py -x plantuml_markdown -x mdx_superscript -x mdx_subscript

This command does not write to console import messages and so it can resolve your issue.

poulpoulsen commented 4 years ago

hello, i tried this command, but the same message appears. :-(

Before i came here, i asked it there in the python-markdown project. They told me, to ask it here, because it is not related to the project.

i assume, that it is related with plantuml-markdown, because if i only load the other modules with -x, then there is no message.

Now i'm a little bit lost.

Regards Poul

mikitex70 commented 4 years ago

Let me do some test/check, but I don't remember to have put this kind debug messages ...

mikitex70 commented 4 years ago

You were right, it was a my fault: I've forgotten a logger.setLevel(logging.DEBUG) in the code so the messages came from python_markdown but the real cause was in the plantuml_markdown plugin. Now is fixed, I've release the 3.2.2 version. Thanks for reporting the issue.