johanneswuerbach / markdown-inline-mermaid

Render inline graphs with Markdown and Mermaid
MIT License
11 stars 3 forks source link

Fix an issue on generating diagrams from Stdin #7

Closed AhmedRaafat14 closed 1 month ago

AhmedRaafat14 commented 1 month ago

This fixes an issue when the puppeteer opens chromium and chromium hand up there and then throws an error.

I'm using this in my Dockerfile with TechDocs markdown-inline-mermaid==1.0.3 but it keeps giving me an error:

Error : Image not created
Args : ['mmdc', '-p', '/tmp/tmphg83o9_r/puppeteer-config.json', '-o', '/tmp/tmphg83o9_r/out.svg']
stdout : Generating single mermaid chart
stderr : 
No input file specified, reading from stdin. If you want to specify an input file, please use `-i 
.` You can use `-i -` to read from stdin and to suppress this warning.

ProtocolError: Network.enable timed out. Increase the 'protocolTimeout' setting in launch/connect calls for a higher timeout if needed.

Patching the script with these flags due to the latest changes in mermaid-cli fixes that error for me.

AhmedRaafat14 commented 1 month ago

Thanks @johanneswuerbach for the quick response.

Do I need to bump the version in setup.py and do I need to do git tag ...?

johanneswuerbach commented 1 month ago

@AhmedRaafat14 , I've pushed 1.0.4 to pypi https://pypi.org/project/markdown-inline-mermaid/1.0.4/, which includes your change.