-
-
Notifications
You must be signed in to change notification settings - Fork 181
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
Missing configuration for prismjs #262
Comments
Hi @zmadel, This is documented in the README.md: https://github.com/jfcere/ngx-markdown#syntax-highlight The example in the documentation shows how to add those files to |
Hi @jfcere |
Adding the Prism files to every component is not necessary, I would suggest you take a look at the ngx-markdown demo folder as a reference. You won't find any import regarding Prism files elsewhere than in the Lines 46 to 59 in 88b9b44
If you are experiencing any issue in a public repository, please feel free to share it with me and I'll be happy take a look at it to help you find the source of the problem. |
Hi all, |
I can confirm that removing the file @winterle mentioned fixes the issue of getting
|
With a quick search through Prism issues I found this comment: PrismJS/prism#1400 (comment) Let me know if it fixes your issue. |
I haven't heard from anybody for 3 weeks, since the problem comes from Prism library and the solution has been provided I will close the issue. If you are still having issues after applying the solution provided by Prism, please feel free to respond and I will reopen if necessary. |
Hi,
There is a missing configuration that need to be added to the documentation to get prismjs code highlighting work.
These imports need to be added also to the component TS file before using tag for code highlighting, without it the code highlighting doesn't work for prismjs custom components
import "prismjs/components/prism-typescript";
import "prismjs/components/prism-json";
import "prismjs/components/prism-scss";
import "prismjs/plugins/line-numbers/prism-line-numbers";
The text was updated successfully, but these errors were encountered: