mirror of
https://github.com/Redocly/redoc.git
synced 2025-08-07 21:54:53 +03:00
fix: update json props color
This commit is contained in:
parent
d185ce4aa3
commit
670c17163e
|
@ -82,9 +82,9 @@ export const PrismDiv = styled.div`
|
|||
}
|
||||
}
|
||||
|
||||
/* .property.token.string {
|
||||
.token.property.string {
|
||||
color: white;
|
||||
} */
|
||||
}
|
||||
|
||||
.token.operator,
|
||||
.token.entity,
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
import { highlight, mapLang } from '../../utils/highlight';
|
||||
|
||||
describe('prism.js helpers', () => {
|
||||
test('mapLang should map "json" to "js"', () => {
|
||||
expect(mapLang('json')).toBe('js');
|
||||
});
|
||||
|
||||
test('mapLang should map to "clike" by default', () => {
|
||||
expect(mapLang('non-existring')).toBe('clike');
|
||||
});
|
||||
|
|
|
@ -8,7 +8,6 @@ import 'prismjs/components/prism-csharp.js';
|
|||
import 'prismjs/components/prism-go.js';
|
||||
import 'prismjs/components/prism-http.js';
|
||||
import 'prismjs/components/prism-java.js';
|
||||
import 'prismjs/components/prism-json.js';
|
||||
import 'prismjs/components/prism-lua.js';
|
||||
import 'prismjs/components/prism-markup-templating.js'; // dep of php
|
||||
import 'prismjs/components/prism-markup.js'; // xml
|
||||
|
@ -53,6 +52,7 @@ Prism.languages.insertBefore(
|
|||
export function mapLang(lang: string): string {
|
||||
return (
|
||||
{
|
||||
json: 'js',
|
||||
'c++': 'cpp',
|
||||
'c#': 'csharp',
|
||||
'objective-c': 'objectivec',
|
||||
|
|
Loading…
Reference in New Issue
Block a user