def get_component(self, tag: str, **props) -> Component:
        """Get the component for a tag and props.

        Args:
            tag: The tag of the component.
            **props: The props of the component.

        Returns:
            The component.

        Raises:
            ValueError: If the tag is invalid.
        """
        # Check the tag is valid.
        if tag not in self.component_map:
            msg = f"No markdown component found for tag: {tag}."
            raise ValueError(msg)

        special_props = [_PROPS]
        children = [
            _CHILDREN
            if tag != "codeblock"
            # For codeblock, the mapping for some cases returns an array of elements. Let's join them into a string.
            else ternary_operation(
                ARRAY_ISARRAY.call(_CHILDREN),
                _CHILDREN.to(list).join("\n"),
                _CHILDREN,
            ).to(str)
        ]

        # For certain tags, the props from the markdown renderer are not actually valid for the component.
        if tag in NO_PROPS_TAGS:
            special_props = []

        # If the children are set as a prop, don't pass them as children.
        children_prop = props.get("children")
        if children_prop is not None:
            children = []
        # Get the component.
        return self.component_map[tag](*children, **props).set(
            special_props=special_props
        )
Get the component for a tag and props.

        Args:
            tag: The tag of the component.
            **props: The props of the component.

        Returns:
            The component.

        Raises:
            ValueError: If the tag is invalid.
        
reflex/components/markdown/markdown.py