9 | | I've looked into this. The Lexer classes don't declare the valid options. They will consume valid options as keyword arguments and ignore invalid options. [wiki:1.1/WikiProcessors#AvailableProcessors MIME Type Processors] support some keyword arguments that are known by `formatter.py`: [browser:/tags/trac-1.1.5/trac/wiki/formatter.py#L349 lineno, marks, id]. The only option I can see for allowing Pygments Lexer options to be specified in a 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. |
| 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 | |
| 11 | The only way I can see to allow Pygments Lexer options to be specified in a MIME WikiProcessor usage 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. |