From eb7cadd64faee9e654a9aee992d21d7bceb716ea Mon Sep 17 00:00:00 2001 From: Vanya Sergeev Date: Mon, 30 Jun 2014 00:59:39 -0700 Subject: [PATCH] Enable line number anchors when using pygments HtmlFormatter Signed-off-by: Vanya Sergeev --- utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/utils.py b/utils.py index 51141e4..46407bd 100644 --- a/utils.py +++ b/utils.py @@ -89,7 +89,9 @@ def colorize_blob(fname, s): formatter = HtmlFormatter(encoding = 'utf-8', cssclass = 'source_code', - linenos = 'table') + linenos = 'table', + anchorlinenos = True, + lineanchors = 'line') return highlight(s, lexer, formatter)