Skip to content

Commit 119c2f1

Browse files
Merge pull request #92 from adamtheturtle/long-code-blocks
Support colour in long code blocks
2 parents 056fc94 + aba3d97 commit 119c2f1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/sphinx_notion/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,8 @@ def _(
251251
# By default, the code block has a color set (DEFAULT) which means
252252
# that there is no syntax highlighting.
253253
# See https://github.com/ultimate-notion/ultimate-notion/issues/93.
254-
del code_text.rich_texts[0].obj_ref.annotations # pyright: ignore[reportUnknownMemberType]
254+
for rich_text in code_text.rich_texts: # pyright: ignore[reportUnknownMemberType, reportUnknownVariableType]
255+
del rich_text.obj_ref.annotations # pyright: ignore[reportUnknownMemberType]
255256
code_block.rich_text = code_text
256257
return [code_block]
257258

0 commit comments

Comments
 (0)