How to use the justext.utils.is_blank function in jusText

To help you get started, we’ve selected a few jusText 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 miso-belica / jusText / tests / test_utils.py View on Github external
def test_string_with_chars_is_not_blank(self):
        assert not is_blank("  #  ")
github miso-belica / jusText / tests / test_utils.py View on Github external
def test_empty_string_is_blank(self):
        assert is_blank("")
github miso-belica / jusText / tests / test_utils.py View on Github external
def test_string_with_space_is_blank(self):
        assert is_blank(" ")
github miso-belica / jusText / tests / test_utils.py View on Github external
def test_string_with_narrow_nobreak_space_is_blank(self):
        assert is_blank("\u202F \t")
github miso-belica / jusText / tests / test_utils.py View on Github external
def test_string_with_nobreak_space_is_blank(self):
        assert is_blank("\u00A0\t ")
github miso-belica / jusText / tests / test_utils.py View on Github external
def test_string_with_whitespace_is_blank(self):
        assert is_blank("\t\n ")
github miso-belica / jusText / tests / test_utils.py View on Github external
def test_string_with_tab_is_blank(self):
        assert is_blank("\t")
github miso-belica / jusText / tests / test_utils.py View on Github external
def test_string_with_spaces_is_blank(self):
        assert is_blank("    ")
github miso-belica / jusText / tests / test_utils.py View on Github external
def test_string_with_newline_is_blank(self):
        assert is_blank("\n")
github miso-belica / jusText / justext / core.py View on Github external
def characters(self, content):
        if is_blank(content):
            return

        text = self.paragraph.append_text(content)

        if self.link:
            self.paragraph.chars_count_in_links += len(text)
        self.br = False