Skip to content

Markdown callouts/attention blocks do not follow GitHub's behaviour with backslashes #31214

Closed
@UtkarshKunwar

Description

@UtkarshKunwar

Description

GitHub's markdown attention blocks discussed in #28316 and introduced in v1.22.0 with #21711 do not follow the same behaviour when the square brackets are escaped with backslashes.

I noted this issue when the mdformat tool corrected the syntax by escaping the square brackets. GitHub was dealing with this just fine but Gitea failed in this situation.

Gitea Version

v1.22.0

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

Behaviour on GitHub

> [!NOTE]
> testing note without backslash

Note

testing note without backslash


> \[!NOTE\]
> testing note with backslash

Note

testing note with backslash

Behaviour on Gitea

image

Git Version

No response

Operating System

No response

How are you running Gitea?

Used https://demo.gitea.com as well as self-hosted deb package instance.

Database

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions