sbarex / QLMarkdown

macOS Quick Look extension for Markdown files.
GNU General Public License v3.0
1.36k stars 33 forks source link

Feature Request: GitHub Alerts #143

Open orchetect opened 1 month ago

orchetect commented 1 month ago

In May 2024 GitHub revised their callout syntax (they call them Alerts).

It would be lovely to gain support for these in QLMarkdown.

(Various 3rd-party Markdown editors now support it including Typora.)

[!NOTE]
Highlights information that users should take into account, even when skimming.

[!TIP] Optional information to help a user be more successful.

[!IMPORTANT]
Crucial information necessary for users to succeed.

[!WARNING]
Critical content demanding immediate user attention due to potential risks.

[!CAUTION] Negative potential consequences of an action.

setanarut commented 1 month ago

Why only English? They could just put an icon without text. https://github.com/orgs/community/discussions/16925#discussioncomment-10458963

If this feature is to be added to QLMarkdown, a CSS trick for other languages ​​is required.

orchetect commented 1 month ago

People have been expressing a desire for localized versions of these for years (as seen by the many comments on that GitHub issue thread). There's been no movement from GitHub staff to implement any thus far. Perhaps they will in future, but all we have are English alerts for now.

I would certainly understand any hesitancy of implementing the behaviour in QLMarkdown with that considered. I'm only suggesting it so as to closer match QLMarkdown's rendering to GitHub's rendering, as-is.

Perhaps we would be able to meet in the middle, like you say. If QLMarkdown rendered them with the colored line and the icon, it could just omit the text label. That way no localization is necessary, even though it won't explicitly mirror GitHub's rendering.

setanarut commented 1 month ago

I just wrote this as a suggestion. @sbarex may want to add it as an extra feature.