@@ -387,24 +387,15 @@ def is_nested_node(el):
387387
388388 if current_level_object is None :
389389 objects = children_objects
390- elif isinstance (current_level_object , list ):
391- objects = current_level_object + children_objects
392390 elif isinstance (current_level_object , BlockBase ):
393- # objects = current_level_object
394391 objects = reconcile_to_block (current_level_object , children_objects )
395392 elif isinstance (current_level_object , RichTextBase ):
396- # There is an assumption that text formatting tags will not contain
397- # higher level tags like blockquotes, lists, etc.
398- # for child in children_objects:
399- # if isinstance(child, str):
400- # append_to_rich_text(current_level_object, child)
401-
402- # objects = [current_level_object]
403393 objects = reconcile_to_rich_text (current_level_object , children_objects )
404-
405- # import ipdb
406-
407- # ipdb.set_trace()
394+ else :
395+ import ipdb ; ipdb .set_trace ()
396+ raise Exception (
397+ f"Current node has yielded an unexpected type { type (current_level_object )} "
398+ )
408399
409400 return objects
410401
@@ -499,11 +490,12 @@ def convert_a(self, el, convert_as_inline):
499490 # title = href
500491
501492 # title_part = ' "%s"' % title.replace('"', r"\"") if title else ""
502- return [
503- create_rich_text (text = prefix ),
504- create_rich_text (text = text , url = href ),
505- create_rich_text (text = suffix ),
506- ]
493+ # return [
494+ # create_rich_text(text=prefix),
495+ # create_rich_text(text=text, url=href),
496+ # create_rich_text(text=suffix),
497+ # ]
498+ return create_rich_text (text = text , url = href )
507499 # return (
508500 # "%s[%s](%s%s)%s" % (prefix, text, href, title_part, suffix)
509501 # if href
0 commit comments