Changes between Version 2 and Version 3 of Ticket #5654, comment 9
- Timestamp:
- Jun 18, 2015, 10:49:06 AM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #5654, comment 9
v2 v3 9 9 In Trac, [wiki:1.1/WikiProcessors#AvailableProcessors MIME Type WikiProcessors] support some keyword arguments that are known by `formatter.py`: [browser:/tags/trac-1.1.5/trac/wiki/formatter.py#L349 lineno, marks, id]. However, there doesn't seem to be a way for Trac to know the options supported by the Lexers. The Lexer classes don't declare the valid options. Instances of the Lexer classes will consume valid options as keyword arguments and ignore invalid options. 10 10 11 The only way I can see to allow Pygments Lexer options to be specified in a MIME WikiProcessor usageis to consider all unknown keyword arguments to be lexer options. I think that is probably okay though since the Lexers will just ignore any unknown options. We could also see if Pygments is willing to consider an enhancement in which they specify the valid option names as a class attribute.11 The only way I can see to allow Pygments Lexer options to be used as keyword arguments for MIME WikiProcessor is to consider all unknown keyword arguments to be lexer options. I think that is probably okay though since the Lexers will just ignore any unknown options. We could also see if Pygments is willing to consider an enhancement in which they specify the valid option names as a class attribute.