@classmethod
def _check_special_char_position(cls, last_special: str, special: str) ->str:
    """
        Returns an action to execute if the character is well placed. It should
        only be applied over special characters.

        If it's not well placed, the character will be included in the text
        """
    if special == cls.open_flag_char:
        if last_special not in [cls.end_format_char, None]:
            return cls.ESCAPE_CHAR
        else:
            return cls.START_FLAGS
    elif special == cls.close_flag_char:
        if last_special != cls.open_flag_char:
            return cls.ESCAPE_CHAR
        else:
            return cls.START_FORMAT
    elif special == cls.end_format_char:
        if last_special in [cls.open_flag_char, cls.end_format_char, None]:
            return cls.ESCAPE_CHAR
        else:
            return cls.END_FORMAT
