Skip to content

Commit

Permalink
docs: Fix a regression for a quoted-attribute example (sveltejs#9103)
Browse files Browse the repository at this point in the history
* Fix a doc regression for a quoted-attribute example

* Prettier ignore

---------

Co-authored-by: Puru Vijay <[email protected]>
  • Loading branch information
andy0130tw and PuruVJ authored Aug 13, 2023
1 parent 3597ced commit 037b6ce
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion documentation/docs/02-template-syntax/02-basic-markup.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ All other attributes are included unless their value is [nullish](https://develo

An expression might include characters that would cause syntax highlighting to fail in regular HTML, so quoting the value is permitted. The quotes do not affect how the value is parsed:

<!-- prettier-ignore -->
```svelte
<button disabled={number !== 42}>...</button>
<button disabled="{number !== 42}">...</button>
```

When the attribute name and value match (`name={name}`), they can be replaced with `{name}`.
Expand Down

0 comments on commit 037b6ce

Please sign in to comment.