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

feat: add JSON syntax highlighting #1287

Merged
merged 5 commits into from
Jul 25, 2020
Merged

feat: add JSON syntax highlighting #1287

merged 5 commits into from
Jul 25, 2020

Conversation

barisdigi
Copy link
Contributor

Using JavaScript highlights for JSON looks confusing as keys and string values are the same color.

Using JavaScript highlights for JSON looks confusing as keys and string values are the same color.
@RomanHotsiy RomanHotsiy self-requested a review June 9, 2020 09:03
Copy link
Member

@RomanHotsiy RomanHotsiy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not enough, you also have to update the mapping here: https://github.com/Redocly/redoc/blob/master/src/utils/highlight.ts#L55

src/utils/highlight.ts Outdated Show resolved Hide resolved
@barisdigi
Copy link
Contributor Author

Thank you, I hadn't realised that. I guess simply removing the mapping to js will be enough here since prismjs accepts json.

@RomanHotsiy
Copy link
Member

OK, I had to rework this after I tasted it locally.

Looks like below right now:

image

@RomanHotsiy RomanHotsiy merged commit c9596d4 into Redocly:master Jul 25, 2020
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

Successfully merging this pull request may close these issues.

2 participants