fern icon indicating copy to clipboard operation
fern copied to clipboard

[Bug]: error parsing <= in text in markdown files

Open alkasm opened this issue 1 year ago • 0 comments

Describe the bug

The markdown parser gets confused on <= when used in text, presumably thinking its the start of an HTML tag or similar.

I was getting

[docs]:Failed to read docs configuration. Rendering last successful configuration.

on the dev server when I copy/pasted some autogenerated markdown into an md file. After deleting chunks of my markdown, I found that having the text <= was the culprit. Presumably the parser thought this was a starting HTML tag. Replacing it with \<= or putting the expression in backticks e.g. `<=` fixed it.

To reproduce

Create a markdown file with the characters <= in it. (I didn't check if just < was enough). And potentially need to link to that markdown file in docs.yml

Expected behavior

I spent awhile thinking I did something else incorrectly because the error message mentioned that it failed to read the docs configuration. So a more explicit error message would be great for parsing issues.

Additionally I believe this is valid markdown, so probably should just work either way? GitHub doesn't have an issue with using <= in text at least, as seen in this issue.

CLI Version

The version of the Fern CLI you are using (found in fern.config.json).

% fern -v
0.43.0

alkasm avatar Sep 25 '24 17:09 alkasm