Files
test-repo/tests/mdx/levels.mdx
T
Gustav Tiger e76ce2725b Fix MDX html parsing errors (#6949)
* 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
2019-11-15 12:01:58 +02:00

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 >