svelteness / kit-docs

Documentation integration for SvelteKit.
https://kitdocs.vercel.app
MIT License
457 stars 32 forks source link

Left curly bracket in markdown seems to be unescapable #78

Open davej opened 1 year ago

davej commented 1 year ago

I am trying to put a left curly bracket { in my markdown docs but it doesn't seem to be possible. A few variations that I've tried all give the 500 error "abc is not defined".

{ abc }
\{ abc }
\{ ref \}
{ abc }
{ abc }

This doesn't error but explicitly outputs the characters "{" instead of showing a curly bracket:

\{ abc }

I tried reproducing the error on the online parser here but it seemed to work fine. Any idea how I would go about troubleshooting this?

mihar-22 commented 1 year ago

Ye there's some issues with braces right now because code blocks are inserted like so {@html `...`}. Can I see the code snippet you're trying to insert?

davej commented 1 year ago

Markdown is a table like this:

| Function                                                                      | Description                                                                                                                                                                    |
| ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [addBrowserView({ ref, viewRef, })](<#nativewindow-addbrowserview()>)         | Adds a BrowserView to the reference BrowserWindow.                                                                                                                             |

Which gets rendered like this:

CleanShot 2023-02-09 at 2 28 47@2x

You can see the output here (I have replaced { with &amp;#x007B; just so it will render without an error): https://next.todesktop.com/docs/API/client-core.nativewindow

davej commented 1 year ago

@mihar-22 just following up here. Any suggestions?