(text)
return new_text
Fixes unresolved references after removing References sections.

    Searches for pattern [numeric]_ in the text and removes it. Intel SDC references do not use [numeric]_ pattern

    :param text: Original text
    :return: Reformatted text
Fixes unresolved references after removing References sections.
Fixes unresolved references after removing References sections .
def reformat_remove_unresolved_references(text):
    """
    Fixes unresolved references after removing References sections.

    Searches for pattern [numeric]_ in the text and removes it. Intel SDC references do not use [numeric]_ pattern

    :param text: Original text
    :return: Reformatted text
    """
    new_text = ''
    while len(text) > 0:
        idx = text.find('[')

        if idx >= 0:
            new_text += text[0:idx]
            idx1 = idx+1
            while idx1 < len(text) and text[idx1].isnumeric():
                # Iterating through numeric characters
                idx1 += 1

            if idx1+1 < len(text):
                # There are at least two more symbols after numeric ones in the text
                if text[idx1:idx1+2] != ']_':
                    new_text += text[idx:idx1+2]

                if idx1+2 < len(text):
                    text = text[idx1+2:]  # Remove reference
                else:
                    text = ''
            else:
                new_text += text[idx:]
                text = ''
        else:
            new_text += text
            text = ''
    return new_text
def reformat_remove_unresolved_references ( text ) : new_text = '' while len ( text ) > 0 : idx = text . find ( '[' ) if idx >= 0 : new_text += text [ 0 : idx ] idx1 = idx + 1 while idx1 < len ( text ) and text [ idx1 ] . isnumeric ( ) : # Iterating through numeric characters idx1 += 1 if idx1 + 1 < len ( text ) : # There are at least two more symbols after numeric ones in the text if text [ idx1 : idx1 + 2 ] != ']_' : new_text += text [ idx : idx1 + 2 ] if idx1 + 2 < len ( text ) : text = text [ idx1 + 2 : ] # Remove reference else : text = '' else : new_text += text [ idx : ] text = '' else : new_text += text text = '' return new_text