class documentation

class VisibleWhitespaceFilter(Filter):

View In Hierarchy

Convert tabs, newlines and/or spaces to visible characters.

Options accepted:

spaces : string or bool
If this is a one-character string, spaces will be replaces by this string. If it is another true value, spaces will be replaced by · (unicode MIDDLE DOT). If it is a false value, spaces will not be replaced. The default is False.
tabs : string or bool
The same as for spaces, but the default replacement character is » (unicode RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK). The default value is False. Note: this will not work if the tabsize option for the lexer is nonzero, as tabs will already have been expanded then.
tabsize : int
If tabs are to be replaced by this filter (see the tabs option), this is the total number of characters that a tab should be expanded to. The default is 8.
newlines : string or bool
The same as for spaces, but the default replacement character is (unicode PILCROW SIGN). The default value is False.
wstokentype : bool
If true, give whitespace the special Whitespace token type. This allows styling the visible whitespace differently (e.g. greyed out), but it can disrupt background colors. The default is True.
New in version 0.8.
Method __init__ Undocumented
Method filter Undocumented
Instance Variable wstt Undocumented

Inherited from Filter:

Instance Variable options Undocumented
def __init__(self, **options):

Undocumented

def filter(self, lexer, stream):

Undocumented

wstt =

Undocumented