Skip to content

Alerts: Don't render Obsidian fold character - or + as a title #250

Description

@tuurep

Followup #233

Obsidian supports the following syntax to collapse (fold) the alert contents:

> [!note]-

In our current alerts implementation, this creates an alert with the title - (a dash)

This hurts viewing files written with Obsidian.

A likely solution would be: only parse the custom title outside the square brackets when there's a space between bracket and title. It's probably just surprising behavior anyway, that the title renders without the space.

This could be solved at the same time as #245, they concern editing the same regex.

PS. Vivify doesn't support the Obsidian folding syntax because I feel like that's a bigger rabbit hole (i.e. what else should be foldable) and there's no precedent for folding an alert styled in the GitHub way.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

topic:syntaxe.g. functional Markdown extensionstype:enhancementAdding to/changing existing feature

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions