How to use the telegraph.utils.clear_whitespace_nodes function in telegraph

To help you get started, we’ve selected a few telegraph examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github python273 / telegraph / tests / test_html_converter.py View on Github external
expected = [
            {'tag': 'p', 'children': [
                {'tag': 'i', 'children': ['A']},
                {'tag': 'b', 'children': [' ']},
                {'tag': 'b', 'children': [
                    'B ',
                    {'tag': 'i', 'children': ['C']},
                    {'tag': 'i', 'children': [{'tag': 'b'}]},
                    ' D '
                ]},
                'E '
            ]},
            {'tag': 'p', 'children': ['F ']}
        ]

        self.assertEqual(clear_whitespace_nodes(nodes)[0], expected)