erusev / parsedown

Better Markdown Parser in PHP
https://parsedown.org
MIT License
14.69k stars 1.12k forks source link

Implementet Note blocks as <fieldset> #719

Open Clicketyclick opened 5 years ago

Clicketyclick commented 5 years ago

Creating field sets from blockquotes with header

Microsoft names this "Note blocks" but it is simply fieldsets ( https://docs.microsoft.com/en-us/contribute/how-to-write-use-markdown#note-blocks )

The Header has the syntax: [!#xxx]

Element Function
[! Legend start
# Special legend indicator
xxx Legend text
] Legend end

Examples:

This is a block quote

[!#NOTE] This is a NOTE block

will parse as

This is a block quote
ⓘ NOTEThis is a NOTE block

Special legends with Unicode indicator:

Function Unicode Tag Description
Note # (i)
Warning $ Jolly Roger / Skull and crossbones
Tip 💡 + Light bulb
Important ! /!\

Easy to spice up with som CSS