qjebbs / vscode-markdown-extended

Extended syntaxes to built-in markdown & What you see is what you get exporter.
MIT License
125 stars 25 forks source link

Export not working anymore after the last VS code update #98

Closed YannisFraselle closed 3 years ago

YannisFraselle commented 3 years ago

Hello i can't export anymore .md file into pdf/html/... after the last update of VS code 1.53.0 (the problem appeared after the update so i think its related, the only think that has changed in my environment is this update).

When i try to export I have this error now :

Cannot read property 'push' of undefined
TypeError: Cannot read property 'push' of undefined
    at Object.e.renderer.rules.image (c:\Users\yanni\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\markdown-language-features\dist\extension.js:1:98435)
    at s.renderInline (c:\Users\yanni\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\markdown-language-features\dist\extension.js:1:141745)
    at s.render (c:\Users\yanni\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\markdown-language-features\dist\extension.js:1:142117)
    at h.render (c:\Users\yanni\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\markdown-language-features\dist\extension.js:1:103792)
    at renderHTML (c:\Users\yanni\.vscode\extensions\jebbs.markdown-extended-1.0.18\out\src\services\exporter\shared.js:41:40)
    at Object.renderPage (c:\Users\yanni\.vscode\extensions\jebbs.markdown-extended-1.0.18\out\src\services\exporter\shared.js:26:16)
    at PuppeteerExporter.<anonymous> (c:\Users\yanni\.vscode\extensions\jebbs.markdown-extended-1.0.18\out\src\services\exporter\puppeteer.js:61:33)
    at Generator.next (<anonymous>)
    at fulfilled (c:\Users\yanni\.vscode\extensions\jebbs.markdown-extended-1.0.18\out\src\services\exporter\puppeteer.js:4:58)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)

The issue have also no correlation with what i add or delete in my .md file.

Swanzor commented 3 years ago

I have had the exact same problem now as well. Although going on the error message, I tried commenting out the images and exported it again and now it works (without the images though). So that might be related somehow.

YannisFraselle commented 3 years ago

I have had the exact same problem now as well. Although going on the error message, I tried commenting out the images and exported it again and now it works (without the images though). So that might be related somehow.

I just tested and yep without images no problem, but with images there is the error. I also tested the difference between <img> and ![]() synthax, <img> is working fine with the export but not ![](). So the problem come from ![](). For temporary solution we can use html <img>.

Swanzor commented 3 years ago

I have had the exact same problem now as well. Although going on the error message, I tried commenting out the images and exported it again and now it works (without the images though). So that might be related somehow.

I just tested and yep without images no problem, but with images there is the error. I also tested the difference between <img> and ![]() synthax, <img> is working fine with the export but not ![](). So the problem come from ![](). For temporary solution we can use html <img>.

I see it does work export without errors but the images are broken when I use relative paths. I don't know if this is unrelated, but I can confirm as well that it does kinda work now.

xemoka commented 3 years ago

Running into the same issue here on both Windows 10 and MacOS; vscode 1.53.2 & Markdown Extended 1.0.18;

xemoka commented 3 years ago

Downgrade to VSCode 1.52.1 seems to fix it. Looks like lots has been going on in https://github.com/microsoft/vscode/tree/main/extensions/markdown-language-features.

According to the changelog there is now auto updating of images in the preview, I wonder if this touched it somehow... it looks like this is in VSCode's camp, not markdown-extended. I'm not quite sure how to file this issue though as I don't quite understand how they interact...

I think https://github.com/markdown-it/markdown-it/issues/756 is having the same problems as we are.

damgot commented 3 years ago

Have the exact same issue (https://github.com/markdown-it/markdown-it/issues/756). (Thanks for mention it @xemoka )

But they simply closed my post...

I hope this bug will be taken into account because it creates a lot of problems in our works.

I will try to downgrade VSCode.

MarcoBuess commented 2 years ago

@qjebbs The workaround provided here is relevant for: https://github.com/qjebbs/vscode-markdown-extended/issues/141 and https://github.com/qjebbs/vscode-markdown-extended/issues/140