dokka icon indicating copy to clipboard operation
dokka copied to clipboard

Support GitHub info notes

Open Laxystem opened this issue 11 months ago • 2 comments

On GitHub, this code:

> [!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.

Produces this:

[!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.

But Dokka produces this:

Image

Laxystem avatar Jan 23 '25 10:01 Laxystem

I believe this affects all formats, not just Markdown, because the Dokka module files use Markdown.

kotlin-wrappers has a workaround https://github.com/JetBrains/kotlin-wrappers/blob/cd742f6f65648a7d1eabb757a8b72b725cb4713c/build-logic/wrappersbuild/src/main/kotlin/wrappersbuild.dokka-conventions.gradle.kts#L49-L90

Because these notes have different names I'll quote the docs to help find this issue in the future.

Alerts, also sometimes known as callouts or admonitions, are a Markdown extension based on the blockquote syntax that you can use to emphasize critical information. On GitHub, they are displayed with distinctive colors and icons to indicate the significance of the content.

adam-enko avatar Nov 03 '25 12:11 adam-enko

I believe this affects all formats, not just Markdown

It is, as it affects how we work with Markdown as an input, that's why the tag is language: xxx and not format: xxx.

And, AFAIK, alerts is a feature of GFM only, not of CommonMark.

whyoleg avatar Nov 03 '25 15:11 whyoleg