datopian / flowershow

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

[Question] mdxjs error with Days: [[2023-06-22]] <== [[2023-06-23]] ==> [[2023-06-24]] #527

Closed marcbenedi closed 5 months ago

marcbenedi commented 1 year ago

Hi,

First of all: very cool project! 😃 It's very easy to set up with an existing Obsidian vault.

I need help with my daily notes in Obsidian. I have a link to the current, previous, and next days and I use <== and ==> as arrows. However, when I try to visualize these notes with flowershow I encounter the following error:

Server Error
Error: [next-mdx-remote] error compiling MDX:
Unexpected character `=` (U+003D) before name, expected a character that can start a name, such as a letter, `$`, or `_`

  11 | ---
  12 |
> 13 | Days: [[2023-06-22]] <== [[2023-06-23]] ==> [[2023-06-24]]
     |                       ^
  14 | Week: [[2023-W25]]
  15 |

More information: https://mdxjs.com/docs/troubleshooting-mdx

I understand it's a problem with mdx, as they mention on the troubleshooting page:

The reason for these errors is that JSX has a very strict grammar and expects tags to be valid. There are different solutions depending on what was expected. Please read the error message carefully as it indicates where the problem occurred and what was expected instead.

I have two questions/points:

1) Is it possible to solve this without editing all my daily notes? 2) If not, do you have any recommendations on how to do that?

Thanks in advance!

rufuspollock commented 1 year ago

@marcbenedi i also want this fixed. The best way would be to pre-process markdown to replace => or ==> with something like ⟹ or similar. this could even be a crude regex.