Skip to content

Commit 6daa866

Browse files
authored
Update react/README.md
Fix jsx syntax display issue in webpage Fixes airbnb#2301
1 parent f5c14ca commit 6daa866

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

react/README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,8 @@ This style guide is mostly based on the standards that are currently prevalent i
242242
- Always use double quotes (`"`) for JSX attributes, but single quotes (`'`) for all other JS. eslint: [`jsx-quotes`](https://eslint.org/docs/rules/jsx-quotes)
243243

244244
> Why? Regular HTML attributes also typically use double quotes instead of single, so JSX attributes mirror this convention.
245-
245+
246+
<!--- {% raw %} -->
246247
```jsx
247248
// bad
248249
<Foo bar='bar' />
@@ -256,7 +257,8 @@ This style guide is mostly based on the standards that are currently prevalent i
256257
// good
257258
<Foo style={{ left: '20px' }} />
258259
```
259-
260+
<!--- {% endraw %} -->
261+
260262
## Spacing
261263

262264
- Always include a single space in your self-closing tag. eslint: [`no-multi-spaces`](https://eslint.org/docs/rules/no-multi-spaces), [`react/jsx-tag-spacing`](https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-tag-spacing.md)

0 commit comments

Comments
 (0)