@@ -422,7 +422,9 @@ def _iterate_one_index(
422422 for node in document_iterator .all_content (
423423 print_fragments = True , print_fragments_from_files = False
424424 ):
425- if isinstance (node , (SDocSection , SDocDocument )):
425+ if isinstance (node , (SDocSection , SDocDocument )) or (
426+ isinstance (node , SDocNode ) and node .node_type == "SECTION"
427+ ):
426428 if node in change_stats .map_nodes_to_changes :
427429 continue
428430
@@ -455,8 +457,12 @@ def _iterate_one_index(
455457 )
456458 # FIXME: This is when a Requirement becomes
457459 # a Section with the same UID preserved.
458- if other_section_or_none is not None and not isinstance (
459- other_section_or_none , SDocSection
460+ if other_section_or_none is not None and not (
461+ isinstance (other_section_or_none , SDocSection )
462+ or (
463+ isinstance (other_section_or_none , SDocNode )
464+ and other_section_or_none .node_type == "SECTION"
465+ )
460466 ):
461467 other_section_or_none = None
462468 matched_uid = None
@@ -481,19 +487,22 @@ def _iterate_one_index(
481487 uid_modified = True
482488
483489 if other_section_or_none is not None :
484- if node .title != other_section_or_none .title :
490+ if (
491+ node .reserved_title
492+ != other_section_or_none .reserved_title
493+ ):
485494 title_modified = True
486495 lhs_colored_title_diff = (
487496 get_colored_html_diff_string (
488- node .title ,
489- other_section_or_none .title ,
497+ node .reserved_title ,
498+ other_section_or_none .reserved_title ,
490499 "left" ,
491500 )
492501 )
493502 rhs_colored_title_diff = (
494503 get_colored_html_diff_string (
495- node .title ,
496- other_section_or_none .title ,
504+ node .reserved_title ,
505+ other_section_or_none .reserved_title ,
497506 "right" ,
498507 )
499508 )
@@ -508,8 +517,12 @@ def _iterate_one_index(
508517 if other_section_or_none is not None :
509518 section_token = MID .create ()
510519
511- lhs_section : Optional [Union [SDocSection , SDocDocument ]]
512- rhs_section : Optional [Union [SDocSection , SDocDocument ]]
520+ lhs_section : Optional [
521+ Union [SDocSection , SDocDocument , SDocNode ]
522+ ]
523+ rhs_section : Optional [
524+ Union [SDocSection , SDocDocument , SDocNode ]
525+ ]
513526 if side == "left" :
514527 lhs_section = node
515528 rhs_section = other_section_or_none
@@ -536,7 +549,7 @@ def _iterate_one_index(
536549 ] = section_change
537550 change_stats .add_change (section_change )
538551
539- if isinstance (node , SDocNode ):
552+ if isinstance (node , SDocNode ) and node . node_type != "SECTION" :
540553 #
541554 # Step: We check if a requirement was modified at all, or if
542555 # it has already been checked before. Skipping the requirement
0 commit comments