@@ -1051,6 +1051,16 @@ def render_math_block(self, token: SyntaxTreeNode) -> None:
10511051 self .add_line_and_source_path (node , token )
10521052 self .current_node .append (node )
10531053
1054+ def render_math_block_label (self , token : SyntaxTreeNode ) -> None :
1055+ content = token .content
1056+ label = token .info
1057+ node = nodes .math_block (content , content , nowrap = False , number = None )
1058+ self .add_line_and_source_path (node , token )
1059+ name = nodes .fully_normalize_name (label )
1060+ node ["names" ].append (name )
1061+ self .document .note_explicit_target (node , node )
1062+ self .current_node .append (node )
1063+
10541064 def render_amsmath (self , token : SyntaxTreeNode ) -> None :
10551065 # note docutils does not currently support the nowrap attribute
10561066 # or equation numbering, so this is overridden in the sphinx renderer
@@ -1125,9 +1135,9 @@ def render_myst_role(self, token: SyntaxTreeNode) -> None:
11251135 )
11261136 inliner = MockInliner (self )
11271137 if role_func :
1128- nodes , messages2 = role_func (name , rawsource , text , lineno , inliner )
1138+ _nodes , messages2 = role_func (name , rawsource , text , lineno , inliner )
11291139 # return nodes, messages + messages2
1130- self .current_node += nodes
1140+ self .current_node += _nodes
11311141 else :
11321142 message = self .reporter .error (
11331143 f'Unknown interpreted text role "{ name } ".' , line = lineno
0 commit comments