From f7e3e003a275add685eb32e2c6aea18e7a322c7f Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Thu, 28 Feb 2019 22:05:57 +0100 Subject: code plugin: Add a language class to specify which language this code block is from. --- plugins/code.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/code.py b/plugins/code.py index fa04f758..1c6dfab0 100644 --- a/plugins/code.py +++ b/plugins/code.py @@ -43,6 +43,6 @@ class Plugin(BasePlugin): def command_code(self, args): language, code = args.split(None, 1) lexer = get_lexer_by_name(language) - room = self.api.current_tab() + tab = self.api.current_tab() code = highlight(code, lexer, FORMATTER) - room.command_xhtml('
%s
' % code.rstrip('\n')) + tab.command_xhtml('
%s
' % (language, code.rstrip('\n'))) -- cgit v1.2.3