datopian / flowershow

💐 Publish your obsidian digital garden or any markdown site easily and elegantly.
https://flowershow.app/
MIT License
851 stars 100 forks source link

Prerendering Error for Unicode Character "U+002D" #593

Open hruzgar opened 1 year ago

hruzgar commented 1 year ago

So there is a difference for dash and hyphen. Let me elaborate:

  1. Hyphen-Minus (U+002D): Shortest, used for hyphenating words and as a minus sign.
  2. En Dash (U+2013): Longer than a hyphen, used for ranges (e.g., "10–20").
  3. Em Dash (U+2014): Longest, used for breaks in sentences or for emphasis.

And I think flowershow has a problem rendering the first "Hyphen-Minus" which is weird.

Error while rendering this line:

Project <- Areas -> Resources -> Archive

Full error message from vercel:

<html><body>
<!--StartFragment-->
21:06:44.099 | Error occurred prerendering page "/3. Resouces/Personal Knowledge Management/PARA Notes". Read more: https://nextjs.org/docs/messages/prerender-error
-- | --
21:06:44.099 | Error: [next-mdx-remote] error compiling MDX:
21:06:44.099 | Unexpected character `-` (U+002D) before name, expected a character that can start a name, such as a letter, `$`, or `_`
21:06:44.099 |  
21:06:44.099 | 24 \|
21:06:44.099 | 25 \| ### Areas flow
21:06:44.099 | > 26 \| Project <- Areas -> Resources -> Archive
21:06:44.099 | \|          ^
21:06:44.099 | 27 \|
21:06:44.099 | 28 \| Areas -> Project
21:06:44.100 |  
21:06:44.100 | More information: https://mdxjs.com/docs/troubleshooting-mdx
21:06:44.179 | info  - Generating static pages (34/68)
21:06:44.527 | info  - Generating static pages (51/68)
21:06:44.891 | info  - Generating static pages (68/68)
21:06:44.894 |  
21:06:44.894 | > Export encountered errors on following paths:
21:06:44.894 | /[[...slug]]: /2. Areas/Job/curl POST examples
21:06:44.894 | /[[...slug]]: /3. Resouces/Personal Knowledge Management/PARA Notes
21:06:44.928 | Error: Command "npm run export" exited with 1
21:06:45.216 |  

<!--EndFragment-->
</body>
</html>
rufuspollock commented 1 year ago

Thanks for reporting.

I'm pretty sure the issue is the <- which because we interpret things as MDX not pure markdown tends to cause problems. can you try removing the < and the > and see if this goes away?

hruzgar commented 1 year ago

oh ok will try that when i have time. is there plans to fully interpret it as markdown in the future?

rufuspollock commented 12 months ago

@hruzgar does that work in plain markdown? I'm guessing it does ...

hruzgar commented 12 months ago

I struggle to find it now but it was a sample obsidian vault i downloaded from the internet and it was working flawlessly inside obsidian. I didn't try other markdown editors though so yearh..