@classmethod
def _get_inline_format_as_tuple(cls, text: str) ->list:
    """
        In case some inline formats have been applied we need to get a list of
        tuples indicating the formats to be applied via flags and the text
        where the format should be applied, for instance, if the text is:
        "[rB]Some@ Te[H]xt@"
        We'll get the list [('Some', 'rB), (' Te', None), ('xt', 'H')]
        """
    prev = ''
    last_special_char = None
    list_of_formats = []
    section_text = []
    section_flags = []
    current_action = cls.START_FORMAT
    counter = 0
    close_section = False
    for char in text:
        is_special = cls._define_char(prev, char)
        if is_special:
            action = cls._check_special_char_position(last_special_char, char)
            if action == cls.ESCAPE_CHAR:
                if current_action == cls.START_FLAGS:
                    section_flags.append(char)
                elif current_action == cls.START_FORMAT:
                    section_text.append(char)
            else:
                current_action = action
                if current_action == cls.END_FORMAT:
                    current_action = cls.START_FORMAT
                    close_section = True
                if last_special_char in [cls.end_format_char, None]:
                    current_action = cls.START_FLAGS
                    close_section = True
                last_special_char = char
        elif current_action == cls.START_FLAGS:
            section_flags.append(char)
        elif current_action == cls.START_FORMAT:
            section_text.append(char)
        prev = char
        counter += 1
        if counter == len(text) or close_section:
            list_of_formats.append((''.join(section_text), ''.join(
                section_flags) if len(section_flags) > 0 else None))
            section_text = []
            section_flags = []
            close_section = False
    return list_of_formats
