Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CodeBlock not render properly (Colors)! #21

Open
chetanmajithiya opened this issue Dec 13, 2020 · 4 comments
Open

CodeBlock not render properly (Colors)! #21

chetanmajithiya opened this issue Dec 13, 2020 · 4 comments

Comments

@chetanmajithiya
Copy link

codeBlock keyword element are getting separately to get styles from css,

@chetanmajithiya
Copy link
Author

<EuiCodeBlock language="js" fontSize="m" paddingSize="m" overflowHeight={300} isCopyable>{code}</EuiCodeBlock>

@chetanmajithiya
Copy link
Author

chetanmajithiya commented Dec 13, 2020

@chandlerprall
Copy link
Contributor

Using the same settings within code sandbox highlights the code for me: https://codesandbox.io/s/young-hooks-xylik?file=/index.js

Can you check the devtools' Console and Network tabs for any errors?

@chandlerprall
Copy link
Contributor

Sorry, I lost track of which repo this was asked in. We have limited the language support in this nextjs starter to avoid bloating the bundle size, unless additional languages are needed. Two options:

  1. You can setup your own list of included languages by modifying src/lib/highlight.ts
  2. You can remove the custom configuration entirely in next.config.js by removing lines 104-107
    new NormalModuleReplacementPlugin(
    /^highlight\.js$/,
    path.join(__dirname, `src/lib/highlight.ts`)
    )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants