qjebbs / vscode-markdown-extended

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

Fix admonitions (Issue #120) #122

Closed IJuanI closed 2 years ago

IJuanI commented 2 years ago

As mentioned in Issue #120 , admonitions won't render properly since vscode 1.62.0

This occurs because vscode is now adding a default class to most

elements (code-line). So using attrPush to apply admonition classes would result in adding two "class" attributes to the attr list (in such scenario, html will only take the first one defined into account).

Replacing attrPush with attrJoin fixes this issue. I think it also maintains the same behaviour if there wasn't any previous class defined, but haven't tested it.

I've also updated @types/puppeteer and puppeteer to 1.20.0, as the installed version of @types/puppeteer didn't match with puppeteer's version, which resulted in the extension not building properly

qjebbs commented 2 years ago

Thanks for the investigation and fix!