async def test_repeated_character_removal(self):
        """Test removal of repeated character sequences (5 or more)."""
        test_cases = {
            "Hello!!!!!World": "HelloWorld",  # 5 exclamations removed
            "Test####ing": "Test####ing",  # 4 hashes preserved
            "Normal text": "Normal text",  # No repeated chars
            "!!!!!": "",  # All repeated chars removed
            "Mixed!!!!!...../////": "Mixed",  # Multiple repeated sequences
            "Text^^^^test": "Text^^^^test",  # 4 carets preserved
            "Text^^^^^test": "Texttest",  # 5 carets removed
            "Dots....here": "Dots....here",  # 4 dots preserved
            "Dots.....here": "Dotshere",  # 5 dots removed
        }

        for input_text, expected in test_cases.items():
            result = await self.filter.filter(input_text)
            self.assertEqual(
                result,
                expected,
                f"Failed to handle repeated characters in: '{input_text}'\nExpected: '{expected}'\nGot: '{result}'",
            )
Test removal of repeated character sequences (5 or more).
tests/test_markdown_text_filter.py