view_source: Add line numbers.
This commit is contained in:
parent
175d25b3c4
commit
19afa69d87
@ -760,7 +760,8 @@ class CommandDispatcher:
|
||||
url = self._tabs.current_url()
|
||||
html = frame.toHtml()
|
||||
lexer = pygments.lexers.HtmlLexer()
|
||||
formatter = pygments.formatters.HtmlFormatter(full=True)
|
||||
formatter = pygments.formatters.HtmlFormatter(
|
||||
full=True, linenos='table')
|
||||
highlighted = pygments.highlight(html, lexer, formatter)
|
||||
tab = self._tabs.tabopen(explicit=True)
|
||||
tab.setHtml(highlighted, url)
|
||||
|
Loading…
Reference in New Issue
Block a user