facelessuser / MarkdownPreview

Markdown preview and build plugin for Sublime Text https://facelessuser.github.io/MarkdownPreview/
Other
402 stars 53 forks source link

[Github] Add support for !CAUTION/!IMPORTANT/!NOTE/!TIP/!WARNING using blockquote #174

Closed joshuataylor closed 6 months ago

joshuataylor commented 7 months ago

GitHub has added support for NOTE/TIP/etc which display as a nice little blockquote.

See An option to highlight a "Note" and "Warning" using blockquote (Beta) #16925

This is BETA, but I believe they've settled on the format. Might be worth holding off until it's stable though.

This would be awesome to support this as I really like it for README.md and other documentation.

edit: I believe this is an upstream issue, I'll take a look.

joshuataylor commented 7 months ago

I did a bit of digging, and I had no idea how all this worked, here is a summary from my limited understanding:

The Sublime package MarkdownPreview uses a Python library called Python-Markdown to convert Markdown offline.

To add features that might not be supported, you can create an extension.

Summary of Docs Alerts

  1. There was a request to add Add support for GitHub Flavored Markdown new admonitions to this library, tl;dr: this should exist in markdown-callouts.
  2. There is a request to Add "Microsoft Docs Alerts" style Callouts in the markdown-callouts extension - also see the great comment summarising this.

So basically, either this will be added to markdown-callouts, or perhaps another extension for python-markdown.

facelessuser commented 7 months ago

It is not the Python Markdown parser that needs updating. You need to use the GitHub parse in the right mode, but it is likely the GitHub styling CSS needs to be updated.

facelessuser commented 6 months ago

I'm updating the GitHub styling, so it should style things correctly if you are using the GitHub parser in gfm mode:

Screenshot 2024-01-14 at 1 21 34 PM
facelessuser commented 6 months ago

Closed by: https://github.com/facelessuser/MarkdownPreview/commit/d5376c64b2065c95f90e8f614527f5ae4c23e39c