* Fix MDX html parsing errors For MDX wrap JSX parsing in a fragment before sending it of to babel for parsing and formatting. In MDX adjacent JSX tags are permitted in the root. An option sent to the babel parser omits printing the root fragment and instead just prints its children. Solves #6943 * an attempt to address JounQin's comments * use <$>...</$> instead of <>...</> * refactoring
23 lines
385 B
Plaintext
23 lines
385 B
Plaintext
import { Foo, Bar } from './Fixture'
|
|
|
|
# Hello, world!
|
|
|
|
<Foo bg='red'>
|
|
<div style={{ display: 'block'} }>
|
|
<Bar >hi </Bar>
|
|
{ hello }
|
|
{ /* another comment */}
|
|
</div>
|
|
</Foo>
|
|
|
|
asdfsdf <strong style={{fontWeight: 'bolder'}}>asdfasdf</strong>
|
|
|
|
<Foo/>
|
|
test
|
|
|
|
<ul>
|
|
<li >item {' '} </li>
|
|
<li/>
|
|
</ul >
|
|
|