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

add additional languages and customize prism theme #16

Merged
merged 5 commits into from
Sep 14, 2020
Merged

add additional languages and customize prism theme #16

merged 5 commits into from
Sep 14, 2020

Conversation

teikjun
Copy link
Member

@teikjun teikjun commented Sep 12, 2020

This PR introduces the following changes:

Preview

image

Known issues

There are 2 known issues with objectivec code snippets

  1. on /docs/native-components-ios, there is an objectivec codeblock that does not have syntax highlighting.
    It cannot be tokenized for unknown reason.
  2. objectivec codeblock has different syntax highlighting compared to highlightjs (https://github.com/highlightjs/highlight.js/blob/master/src/styles/solarized-dark.css)
    For example, both # and <...> are both treated as the same type of token now, making it impossible to give them distinct colors.
    image
    image

@teikjun teikjun marked this pull request as draft September 12, 2020 09:51
@teikjun teikjun marked this pull request as ready for review September 12, 2020 17:06
@teikjun
Copy link
Member Author

teikjun commented Sep 12, 2020

This PR is ready for review now 🙂

@teikjun teikjun changed the title WIP: add additional languages and customize prism theme add additional languages and customize prism theme Sep 14, 2020
Copy link

@Simek Simek left a comment

Choose a reason for hiding this comment

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

Thank you @teikjun, this is looking way better! 🙂

I had to remove the lines highlight (https://prismjs.com/plugins/line-highlight/ - can we support this feature in the later time too? currently specifying lines is breaking the code highlight) and I have renamed the Prism theme file just for the readability. Other than that changes LGTM! 👍

@Simek Simek merged commit e29310b into dev Sep 14, 2020
Simek added a commit that referenced this pull request Oct 20, 2020
* add additional languages for prism

* set up custom theme for prism

* customize according to solarized dark theme

* add custom syntax highlighting from react-native

* rename theme file, add Kotlin, fix one ObjC block

Co-authored-by: Bartosz Kaszubowski <gosimek@gmail.com>
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.

Prism do not support additional languages Prism theme is incorrect
2 participants