@@ -739,6 +739,108 @@ def _(
739739 )
740740
741741
742+ @_process_node_to_blocks .register
743+ def _ (
744+ node : nodes .attention ,
745+ * ,
746+ section_level : int ,
747+ ) -> list [Block ]:
748+ """
749+ Process attention admonition nodes by creating Notion Callout blocks.
750+ """
751+ del section_level
752+ return _create_admonition_callout (
753+ node = node ,
754+ emoji = "👀" ,
755+ background_color = BGColor .YELLOW ,
756+ )
757+
758+
759+ @_process_node_to_blocks .register
760+ def _ (
761+ node : nodes .caution ,
762+ * ,
763+ section_level : int ,
764+ ) -> list [Block ]:
765+ """
766+ Process caution admonition nodes by creating Notion Callout blocks.
767+ """
768+ del section_level
769+ return _create_admonition_callout (
770+ node = node ,
771+ emoji = "⚠️" ,
772+ background_color = BGColor .YELLOW ,
773+ )
774+
775+
776+ @_process_node_to_blocks .register
777+ def _ (
778+ node : nodes .danger ,
779+ * ,
780+ section_level : int ,
781+ ) -> list [Block ]:
782+ """
783+ Process danger admonition nodes by creating Notion Callout blocks.
784+ """
785+ del section_level
786+ return _create_admonition_callout (
787+ node = node ,
788+ emoji = "🚨" ,
789+ background_color = BGColor .RED ,
790+ )
791+
792+
793+ @_process_node_to_blocks .register
794+ def _ (
795+ node : nodes .error ,
796+ * ,
797+ section_level : int ,
798+ ) -> list [Block ]:
799+ """
800+ Process error admonition nodes by creating Notion Callout blocks.
801+ """
802+ del section_level
803+ return _create_admonition_callout (
804+ node = node ,
805+ emoji = "❌" ,
806+ background_color = BGColor .RED ,
807+ )
808+
809+
810+ @_process_node_to_blocks .register
811+ def _ (
812+ node : nodes .hint ,
813+ * ,
814+ section_level : int ,
815+ ) -> list [Block ]:
816+ """
817+ Process hint admonition nodes by creating Notion Callout blocks.
818+ """
819+ del section_level
820+ return _create_admonition_callout (
821+ node = node ,
822+ emoji = "💡" ,
823+ background_color = BGColor .GREEN ,
824+ )
825+
826+
827+ @_process_node_to_blocks .register
828+ def _ (
829+ node : nodes .important ,
830+ * ,
831+ section_level : int ,
832+ ) -> list [Block ]:
833+ """
834+ Process important admonition nodes by creating Notion Callout blocks.
835+ """
836+ del section_level
837+ return _create_admonition_callout (
838+ node = node ,
839+ emoji = "❗" ,
840+ background_color = BGColor .RED ,
841+ )
842+
843+
742844@_process_node_to_blocks .register
743845def _ (
744846 node : CollapseNode ,
@@ -1057,6 +1159,78 @@ def visit_tip(self, node: nodes.Element) -> None:
10571159
10581160 raise nodes .SkipNode
10591161
1162+ def visit_attention (self , node : nodes .Element ) -> None :
1163+ """
1164+ Handle attention admonition nodes by creating Notion Callout blocks.
1165+ """
1166+ blocks = _process_node_to_blocks (
1167+ node ,
1168+ section_level = self ._section_level ,
1169+ )
1170+ self ._blocks .extend (blocks )
1171+
1172+ raise nodes .SkipNode
1173+
1174+ def visit_caution (self , node : nodes .Element ) -> None :
1175+ """
1176+ Handle caution admonition nodes by creating Notion Callout blocks.
1177+ """
1178+ blocks = _process_node_to_blocks (
1179+ node ,
1180+ section_level = self ._section_level ,
1181+ )
1182+ self ._blocks .extend (blocks )
1183+
1184+ raise nodes .SkipNode
1185+
1186+ def visit_danger (self , node : nodes .Element ) -> None :
1187+ """
1188+ Handle danger admonition nodes by creating Notion Callout blocks.
1189+ """
1190+ blocks = _process_node_to_blocks (
1191+ node ,
1192+ section_level = self ._section_level ,
1193+ )
1194+ self ._blocks .extend (blocks )
1195+
1196+ raise nodes .SkipNode
1197+
1198+ def visit_error (self , node : nodes .Element ) -> None :
1199+ """
1200+ Handle error admonition nodes by creating Notion Callout blocks.
1201+ """
1202+ blocks = _process_node_to_blocks (
1203+ node ,
1204+ section_level = self ._section_level ,
1205+ )
1206+ self ._blocks .extend (blocks )
1207+
1208+ raise nodes .SkipNode
1209+
1210+ def visit_hint (self , node : nodes .Element ) -> None :
1211+ """
1212+ Handle hint admonition nodes by creating Notion Callout blocks.
1213+ """
1214+ blocks = _process_node_to_blocks (
1215+ node ,
1216+ section_level = self ._section_level ,
1217+ )
1218+ self ._blocks .extend (blocks )
1219+
1220+ raise nodes .SkipNode
1221+
1222+ def visit_important (self , node : nodes .Element ) -> None :
1223+ """
1224+ Handle important admonition nodes by creating Notion Callout blocks.
1225+ """
1226+ blocks = _process_node_to_blocks (
1227+ node ,
1228+ section_level = self ._section_level ,
1229+ )
1230+ self ._blocks .extend (blocks )
1231+
1232+ raise nodes .SkipNode
1233+
10601234 def visit_table (self , node : nodes .Element ) -> None :
10611235 """
10621236 Handle table nodes by creating Notion Table blocks.
0 commit comments