Skip to content

Enable admonitions #2771

@ehuss

Description

@ehuss

Problem

Admonitions provide a convenient way to highlight a block in a particular way.

GitHub admonitions are documented at https://github.com/orgs/community/discussions/16925, and are used in various other markdown tools.

These seem to be growing in more common usage, and since pulldown-cmark handles it natively now, it shouldn't be too much trouble to support it.

Proposed Solution

After updating to pulldown-cmark 0.13, enable the ENABLE_GFM option. Unfortunately I don't know why this particular feature is grouped under that option, since there are a bunch of other "github flavor" options which are separate. It isn't clear to me why it is organized that way, or if there is risk of it growing more capabilities in the future.

The spec is at: https://github.com/pulldown-cmark/pulldown-cmark/blob/master/pulldown-cmark/specs/blockquotes_tags.txt

Unfortunately the current implementation is hard-coded to a specific set of keywords. There is an open issue for custom tags at pulldown-cmark/pulldown-cmark#919.

This will need to be gated behind a flag, though I think we can roll with it enabled by default in 0.5.

Notes

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-MarkdownArea: Issues with markdownC-enhancementCategory: Enhancement or feature request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions