html formatter does not support deep custom tokens

Issue #287 resolved
Former user created an issue

The function _get_ttype_class() in is designed to create css class names for custom token types (of the form standardclass-subtype1-subtype2 etc.). But it does do this for a single custom subtype only, due to the statement

fname = STANDARD_TYPES.get(ttype)

inside the loop

while fname is None:

After executing the offending statement once, fname won’t be None any longer due to the default empty string parameter in get(). Removing the default value fixes the problem - and won’t loop forever because Token itself is in STANDARD_TYPES.

Kai Brüning

Reported by guest

Comments (4)

  1. Log in to comment