unkeyed / unkey

Open source API management platform
https://go.unkey.com
Other
2.76k stars 278 forks source link

Blog: json syntax highlighting doesn't work #1994

Closed chronark closed 3 weeks ago

chronark commented 1 month ago

Preliminary Checks

Reproduction / Replay Link (Optional)

No response

Issue Summary

CleanShot 2024-07-30 at 10 06 42@2x

Steps to Reproduce

Create a json code block in our blog

Expected behavior

It should have syntax highlighting

Other information

No response

Screenshots

No response

Version info

- OS:
- Node:
- npm:
linear[bot] commented 1 month ago

ENG-1292 Blog: json syntax highlighting doesn't work

perkinsjr commented 1 month ago

This is a problem with using prism-react-renderer out of the box is supports a handful of languages, and that is not one of them.

We should just move to react-syntax-highlighter which has all languages supported out of the box and then fix our theme for support there.

This can be tackled by @MichaelUnkey with minimal effort.

With one line change this is what I got out of the box.

image

If we don't want to do that, then we should consider creating an escape hatch for syntax highlight unsupported languages.