fern icon indicating copy to clipboard operation
fern copied to clipboard

[Feature] Have `fern check` report syntax errors in `.mdx` files

Open cwcowell opened this issue 1 year ago • 0 comments

Problem description

When we have a malformed comment in an .mdx file, like this (notice the missing asterisk after {/):

{/<!-- vale Vale.Spelling = NO -->*/}

then fern check doesn’t report the syntax error as a problem.

Running fern docs dev lets us load the page, but the page shows up as blank (see attached image)

Why would it be useful?

Once we saw the blank page, it took awhile to figure out what the problem was. We eventually tracked down the syntax problem, but that was kind of dumb luck.

Describe the solution (optional)

  • Syntax errors in .mdx files are called out by fern check

and/or

  • An error page appears when you run fern docs dev and then visit a page with syntax errors.

Screenshots

Syntax error causes no content to show up in rendered page: image

cwcowell avatar Sep 19 '24 19:09 cwcowell