class_docstr: 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``.
  
  .. versionadded:: 0.8
class_docstr_tok: ["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","``","\u00b7","``","(","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","``","\u00bb","``","(","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","``","\u00b6","``","(","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","``",".","..","versionadded",":",":","0.8"]
code: def __init__(self, **options):
      Filter.__init__(self, **options)
      for name, default in [
          ("spaces", "·"),
          ("tabs", "»"),
          ("newlines", "¶"),
      ]:
          opt = options.get(name, False)
          if isinstance(opt, string_types) and len(opt) == 1:
              setattr(self, name, opt)
          else:
              setattr(self, name, (opt and default or ""))
      tabsize = get_int_opt(options, "tabsize", 8)
      if self.tabs:
          self.tabs += " " * (tabsize - 1)
      if self.newlines:
          self.newlines += "\n"
      self.wstt = get_bool_opt(options, "wstokentype", True)
  
imports: import re
  from pygments.token import String, Comment, Keyword, Name, Error, Whitespace, string_to_tokentype
  from pygments.filter import Filter
  from pygments.util import get_list_opt, get_int_opt, get_bool_opt, get_choice_opt, ClassNotFound, OptionError, text_type, string_types
  from pygments.plugin import find_plugin_filters
label_desc: Use image node_id 1 to create a new VisibleWhitespaceFilter object from inherited base classes: Filter with example: obj = VisibleWhitespaceFilter()