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

[ENG-3892]Shiki codeblock support decorations #4234

Merged
merged 12 commits into from
Oct 31, 2024

Conversation

ElijahAhianyo
Copy link
Contributor

@ElijahAhianyo ElijahAhianyo commented Oct 24, 2024

rx._x.code_block(
            """
print("Hello there")
print("This is a random text here")
            """,
            language="python",
            use_transformers=True,
            decorations=[
                {

                    "start": {"line": 1, "character": 0},
                    "end": {"line": 1, "character": 11},
                    "properties": {"class": 'highlighted-word'}
                }
            ]
        )
Screenshot 2024-10-26 at 9 12 54 AM

Extra fix: add plain to language literals instead of themes.

@ElijahAhianyo ElijahAhianyo marked this pull request as ready for review October 25, 2024 17:20
@ElijahAhianyo ElijahAhianyo marked this pull request as draft October 25, 2024 17:59
@ElijahAhianyo ElijahAhianyo marked this pull request as ready for review October 26, 2024 09:14
@ElijahAhianyo ElijahAhianyo changed the title Shiki codeblock support decorations [ENG-3892]Shiki codeblock support decorations Oct 28, 2024
Copy link

linear bot commented Oct 28, 2024

@ElijahAhianyo ElijahAhianyo requested a review from masenf October 30, 2024 07:17
@ElijahAhianyo ElijahAhianyo merged commit a968231 into main Oct 31, 2024
29 checks passed
@masenf masenf deleted the elijah/shiki-decorators-support branch December 12, 2024 07:03
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.

3 participants