Skip to content

Commit

Permalink
Fix to clarify error
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed May 22, 2024
1 parent d3398fe commit f639f9a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
10 changes: 6 additions & 4 deletions docs/docs/what-is-mdx.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -318,20 +318,22 @@ So you *can* build incorrect HTML (which you shouldn’t):
```

It’s not possible to wrap “blocks” if text and tags are on the same line but the
corresponding tags are on different lines:
corresponding opening and closing tags are in different blocks
(so this is invalid!):

```mdx
```txt chrome=no
Welcome! <a href="about.html">
This is home of...
# The Falcons!</a>
```

That’s because to parse markdown, we first have to divide it into “blocks”.
To parse markdown, we first have to divide it into “blocks”.
So in this case two paragraphs and a heading.
Leaving an opening `a` tag in the first paragraph and a stray closing `a` tag in
Leaving an opening `a` tag in the first paragraph and a closing `a` tag in
the heading.
Which causes an error as it is misnested.

## Further reading

Expand Down
7 changes: 7 additions & 0 deletions packages/esbuild/test/crash.js.map

Large diffs are not rendered by default.

0 comments on commit f639f9a

Please sign in to comment.