Skip to content

Commit

Permalink
added documentation about empty-value attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
xavierlacot committed Aug 13, 2024
1 parent cb13267 commit e4c17fb
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/2.5/extensions/attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,21 @@ Output:
<p>This is <em style="color: red">red</em>.</p>
```

### Empty-Value Attributes

Attributes can be rendered in HTML without a value by using `true` value in the markdown document:

```markdown
{itemscope=true}
## Header
```

Output:

```html
<h2 itemscope>Header</h2>
```

## Installation

This extension is bundled with `league/commonmark`. This library can be installed via Composer:
Expand Down

0 comments on commit e4c17fb

Please sign in to comment.