Convert $json to json in package README code blocks (#101187)

This commit is contained in:
Jen Huang 2021-06-02 11:39:18 -07:00 committed by GitHub
parent dc5511f73b
commit 6724a474de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -60,8 +60,10 @@ export const markdownRenderers = {
</EuiLink>
),
code: ({ language, value }: { language: string; value: string }) => {
// Old packages are using `$json`, which is not valid any more with the move to prism.js
const parsedLang = language === '$json' ? 'json' : language;
return (
<EuiCodeBlock language={language} isCopyable>
<EuiCodeBlock language={parsedLang} isCopyable>
{value}
</EuiCodeBlock>
);