This PR adds a :timeout option that can be passed to Pygments.highlight. I also added a bit of a hacky unit test for the new functionality. The other unit test for testing timeouts is similarly presumptive (about how long/short a given machine is likely to take to highlight a block of code), but let me know if you would prefer another approach.
This PR adds a
:timeout
option that can be passed toPygments.highlight
. I also added a bit of a hacky unit test for the new functionality. The other unit test for testing timeouts is similarly presumptive (about how long/short a given machine is likely to take to highlight a block of code), but let me know if you would prefer another approach./cc @tnm