string returned by get_style_defs() does not include all CSS classes

Issue #1023 resolved
Anonymous created an issue

Calling HtmlFormatter().get_style_defs('.highlight') returns a string which does not include all CSS classes used. For example, the class ".highlight .p" is excluded.

Comments (2)

  1. Georg Brandl repo owner

    The classes will be excluded if the token type has no styling in the selected style.

    In the default style, Name tokens and Punctuation tokens have no styling, so this is ok.

  2. Log in to comment