mjbvz / vscode-github-markdown-preview-style

VS Code extension that changes the built-in markdown preview to match Github's styling
https://marketplace.visualstudio.com/items?itemName=bierner.markdown-preview-github-styles
MIT License
307 stars 57 forks source link

[Bug] GitHub "Alert" Syntax Formatting Problem #137

Closed 1chooo closed 2 weeks ago

1chooo commented 3 months ago

Issue with GitHub "Alert" Syntax in New Markdown Preview

While using this extension, the GitHub "alert" syntax experiences formatting issues during rendering, as demonstrated in the video below. This requires some adjustments. Despite this, the extension is a great solution to address my issue https://github.com/microsoft/vscode/issues/214732 in VSCode.

https://github.com/mjbvz/vscode-github-markdown-preview-style/assets/94162591/74fabdcb-f005-43fb-bb0f-57a3d22c4269

Expected:

Screenshot 2024-06-10 at 1 52 22 PM

The current effect:

Screenshot 2024-06-10 at 1 52 38 PM

Thanks a lot!!!

jjspace commented 3 months ago

Duplicate of #135 and #134. Alerts are not supported in this extension, it's a bug with the other one that adds them

1chooo commented 3 months ago

Duplicate of #135 and #134. Alerts are not supported in this extension, it's a bug with the other one that adds them

Sorry for the duplicated Issue, do I have to close this issue?

JSanchezIO commented 3 months ago

I know this has been brought up before, but I don't believe the error is due to the other mentioned extensions. Namely, this extension provides the GitHub styles using generate-github-markdown-css which had a bug in 6.2.0 that omitted the definition of the --base-size-8 and --base-size-16 CSS variables. Those variables are referenced in the alert extensions to style the alerts. Based on that, I'm assuming that if we updated the generate-github-markdown-css dependency and published a new patch version these other extensions should render as expected.

EDIT: I moved this to its own issue #138

davearel commented 1 month ago

Yes please! VS Code's built-in markdown preview renders alerts, but then this addon breaks the styling. Would be nice to match githubs rendering. @JSanchezIO fix seems simple enough?

https://github.blog/changelog/2023-12-14-new-markdown-extension-alerts-provide-distinctive-styling-for-significant-content/

jjspace commented 1 month ago

VS Code's built-in markdown preview renders alerts

@davearel This is incorrect, VSCode does not render alerts without a separate extension that adds support for this. You can verify this by running code --disable-extensions to see what VSCode does "out of the box". If you want it added in VSCode by default (even though it shouldn't be) follow this issue: https://github.com/microsoft/vscode/issues/209652.

That said the style issue should be fixed by #141