ngx-prism / core

Simple Angular 2+ Prism highlighter module.
https://www.npmjs.com/package/@ngx-prism/core
MIT License
12 stars 6 forks source link

JSON language doesn't highlight syntax #13

Open bborad opened 4 years ago

bborad commented 4 years ago

json object and bash command are not highlighted properly

<ngx-prism [language]="'json'" >
       {{content}}
</ngx-prism>

<ngx-prism [language]="'bash'" >
 ng add @angular/fire
</ngx-prism>

--------- Component

public content = `"deploy" : {
                  "builder" : "@angular/fire:deploy",
                  "options" : {} 
        }`;

image

But checking on prismjs.com/ test drive show it correct image

different I noticed is test drive has "language-markup" in "pre" tag and "language-json" in "code" tag but with ngx-prism/core these bot tags are set as "language-json".

Am I missing anything?

Thanks

bborad commented 4 years ago

has some success, import json language fixes the problem for json but still no luck with bash.

import 'prismjs/components/prism-json.min'; //fixes JSON issue import 'prismjs/components/prism-bash.min'; //still ng add @angular/fire is not highlighted