def escape_mdx_special_chars(text):
    """Escape special characters that could cause issues in MDX parsing.

    Args:
        text (str): The text to escape

    Returns:
        str: Text with special characters escaped
    """
    if not text:
        return text

    # Replace angle brackets with their HTML entity equivalents
    escaped_text = text.replace("<", "&lt;").replace(">", "&gt;")

    # Debug statement to verify the function is working
    print(f"Escaping text: '{text}' -> '{escaped_text}'")

    return escaped_text
Escape special characters that could cause issues in MDX parsing.

    Args:
        text (str): The text to escape

    Returns:
        str: Text with special characters escaped
    
fern/scripts/update_connector_docs/generators/mdx_generator.py