Add input type(s) as optional argument to NameHighlightFilter

Issue #790 resolved
J Smith
created an issue

Currently the NameHighlightFilter only converts tokens of type Name. There is no filter to convert tokens of other types. For lexers such as the CommonLispLexer, in which almost everything is lexed as Token.Name,Variable, this is problematic - the only workaround it to write and entire filter, which can be daunting to non-python programmers, or users of Sphinx who just want to get something working quickly with a new lines of code.

I suggest a constructor that could be called like this: {{{


    filter = NameHighlightFilter(
        names=['foo', 'bar', 'baz'],
        inputtokentypes=[Name, Name.Variable, 


Comments (5)

  1. Log in to comment