How to use the ansi2html.converter.ANSI_INTENSITY_REDUCED function in ansi2html

To help you get started, we’ve selected a few ansi2html 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 ralphbean / ansi2html / tests / test_ansi2html.py View on Github external
def test_lighter_text(self):
        sample = 'NORMAL\x1b[%dmLIGHTER\x1b[%dmBOLD\x1b[%dmNORMAL' % (ANSI_INTENSITY_REDUCED, ANSI_INTENSITY_INCREASED, ANSI_INTENSITY_NORMAL)

        html = Ansi2HTMLConverter(inline=True).convert(sample, full=False)
        expected = six.u('NORMAL<span style="font-weight: lighter">LIGHTER</span><span style="font-weight: bold">BOLD</span>NORMAL')

        self.assertEqual(expected, html)