mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Handle guess_lexer exceptions in pygments reST directive
This commit is contained in:
parent
6cedd67c38
commit
36bc7ba5b5
3 changed files with 9 additions and 2 deletions
4
CHANGES
4
CHANGES
|
@ -1,4 +1,8 @@
|
|||
|
||||
2.3-397 | 2015-01-27 10:13:10 -0600
|
||||
|
||||
* Handle guess_lexer exceptions in pygments reST directive (Jon Siwek)
|
||||
|
||||
2.3-396 | 2015-01-23 10:49:15 -0600
|
||||
|
||||
* DNP3: fix reachable assertion and buffer over-read/overflow.
|
||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
2.3-396
|
||||
2.3-397
|
||||
|
|
|
@ -135,7 +135,10 @@ class Pygments(Directive):
|
|||
# lexer not found, use default.
|
||||
lexer = TextLexer()
|
||||
else:
|
||||
lexer = guess_lexer(content)
|
||||
try:
|
||||
lexer = guess_lexer(content)
|
||||
except:
|
||||
lexer = TextLexer()
|
||||
|
||||
# import sys
|
||||
# print >>sys.stderr, self.arguments, lexer.__class__
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue