From 53c23d4e000d7f17fb681c6d7ccabffecbb74389 Mon Sep 17 00:00:00 2001 From: Elijah Date: Mon, 28 Oct 2024 21:41:30 +0000 Subject: [PATCH] address PR comment --- reflex/components/datadisplay/shiki_code_block.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/reflex/components/datadisplay/shiki_code_block.py b/reflex/components/datadisplay/shiki_code_block.py index 567ef82c4..9f85576a4 100644 --- a/reflex/components/datadisplay/shiki_code_block.py +++ b/reflex/components/datadisplay/shiki_code_block.py @@ -589,7 +589,12 @@ class ShikiCodeBlock(Component): ) # cast decorations into ShikiDecorations. - decorations = [ShikiDecorations(**decoration) for decoration in decorations] + decorations = [ + ShikiDecorations(**decoration) + if not isinstance(decoration, ShikiDecorations) + else decoration + for decoration in decorations + ] code_block_props["decorations"] = decorations code_block_props["code"] = children[0]