h2oai / wave

Realtime Web Apps and Dashboards for Python and R
https://wave.h2o.ai
Apache License 2.0
3.9k stars 324 forks source link

fix: Show curly braces in pydocs correctly #1880 #2027

Closed marek-mihok closed 1 year ago

marek-mihok commented 1 year ago

Pdoc builds the docs correctly when curly braces {} are used. The problem is with docusaurus using the MDX compiler for .md files generated by pdoc while building the website. In MDX, curly braces are reserved for expressions so in our case the MDX compiler is looking for a fruit variable which is, obviously, not defined - @on('#foo/{fruit}'). We can fix this by writing an expression inside the curly braces which returns what we want, in our case {"{fruit}"}.

Closes #1880