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-3848][ENG-3861]Shiki Code block Experimental #4030

Merged
merged 40 commits into from
Oct 22, 2024
Merged
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
9025d72
Shiki Code block Experimental
ElijahAhianyo Sep 30, 2024
955c53a
refactor
ElijahAhianyo Oct 1, 2024
d1e2d7c
update code
ElijahAhianyo Oct 1, 2024
4860978
remove console.log
ElijahAhianyo Oct 1, 2024
5ffa09f
add transformers to namespace
ElijahAhianyo Oct 1, 2024
1443c67
some validations
ElijahAhianyo Oct 1, 2024
e5d9a56
fix components paths
ElijahAhianyo Oct 1, 2024
03158b6
fix ruff
ElijahAhianyo Oct 1, 2024
a896a2f
add a high-level component
ElijahAhianyo Oct 2, 2024
fd16a49
fix mapping
ElijahAhianyo Oct 2, 2024
b0f6e9f
fix mapping
ElijahAhianyo Oct 2, 2024
46c8096
python 3.9+
ElijahAhianyo Oct 2, 2024
801ed84
see if this fixes the tests
ElijahAhianyo Oct 2, 2024
3c892f8
fix pyi and annotations
ElijahAhianyo Oct 2, 2024
f6495a6
minimal update of theme and language map
ElijahAhianyo Oct 2, 2024
10e144d
add hack for reflex-web/flexdown
ElijahAhianyo Oct 2, 2024
e3cbe79
unit test file commit
ElijahAhianyo Oct 2, 2024
e6cb418
[ENG-3895] [ENG-3896] Update styling for shiki code block
carlosabadia Oct 3, 2024
860449f
strip transformer triggers
ElijahAhianyo Oct 4, 2024
38f3966
minor refactor
ElijahAhianyo Oct 4, 2024
8e0044d
linter
ElijahAhianyo Oct 4, 2024
d1cd68d
fix pyright
ElijahAhianyo Oct 4, 2024
fa9b192
pyi fix
ElijahAhianyo Oct 4, 2024
f20b32b
add unit tests
ElijahAhianyo Oct 4, 2024
4ba277c
sneaky pyright ignore
ElijahAhianyo Oct 4, 2024
89b3891
the transformer trigger regex should remove the language comment char…
ElijahAhianyo Oct 4, 2024
4b35680
minor refactor
ElijahAhianyo Oct 4, 2024
e178cf7
fix silly mistake
ElijahAhianyo Oct 4, 2024
3743492
component mapping in markdown should use the first child for codeblock
ElijahAhianyo Oct 15, 2024
6651793
use ternary operator in numbers.py, move code block args to class for…
ElijahAhianyo Oct 16, 2024
a18a5b0
precommit
ElijahAhianyo Oct 16, 2024
a634a26
pyright fix
ElijahAhianyo Oct 16, 2024
8bf79bd
remove id on copy button animation
carlosabadia Oct 16, 2024
3406991
pyright fix for real
ElijahAhianyo Oct 16, 2024
ea2c579
pyi fix
ElijahAhianyo Oct 17, 2024
7359004
pyi fix fr
ElijahAhianyo Oct 17, 2024
d692a05
check if svg exists
carlosabadia Oct 17, 2024
9f6c266
copy event chain
carlosabadia Oct 18, 2024
d2f3e6b
do a concatenation instead of first child
ElijahAhianyo Oct 18, 2024
f3040ab
added comment
ElijahAhianyo Oct 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix silly mistake
ElijahAhianyo committed Oct 22, 2024
commit e178cf7c0a8b4259e9c39683ccd819666ee878b3
2 changes: 1 addition & 1 deletion reflex/components/datadisplay/shiki_code_block.py
Original file line number Diff line number Diff line change
@@ -786,7 +786,7 @@ def _strip_transformer_triggers(code: str | StringVar) -> StringVar | str:
code, StringVar(_js_expr=f"/{regex_pattern}/g", _var_type=str), ""
)
if isinstance(code, str):
return re.sub(r"[\/#]+ *\[!code.*?\]", "", code)
return re.sub(regex_pattern, "", code)


class TransformerNamespace(ComponentNamespace):