diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/code.py | 4 |
1 files changed, 2 insertions, 2 deletions
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('<pre>%s</pre>' % code.rstrip('\n')) + tab.command_xhtml('<pre><code class="language-%s">%s</code></pre>' % (language, code.rstrip('\n'))) |