def visit_console_html(self, node):
if self.builder.name in ('<STR_LIT>', '<STR_LIT>') and node['<STR_LIT>']:<EOL><INDENT>self.document._console_directive_used_flag = True<EOL>uid = node['<STR_LIT>']<EOL>self.body.append('''<STR_LIT>''' % {'<STR_LIT:id>': uid})<EOL>try:<EOL><INDENT>self.visit_literal_block(node)<EOL><DEDENT>except nodes.SkipNode:<EOL><INDENT>pass<EOL><DEDENT>self.body.append('<STR_LIT>')<EOL>self.body.append('<STR_LIT>' % {'<STR_LIT:id>': uid})<EOL>win_text = node['<STR_LIT>']<EOL>highlight_args = {'<STR_LIT>': True}<EOL>if '<STR_LIT>' in node:<EOL><INDENT>linenos = node['<STR_LIT>']<EOL><DEDENT>else:<EOL><INDENT>linenos = win_text.count('<STR_LIT:\n>') >= self.highlightlinenothreshold - <NUM_LIT:1><EOL><DEDENT>def warner(msg):<EOL><INDENT>self.builder.warn(msg, (self.builder.current_docname, node.line))<EOL><DEDENT>highlighted = self.highlighter.highlight_block(<EOL>win_text, '<STR_LIT>', warn=warner, linenos=linenos, **highlight_args<EOL>)<EOL>self.body.append(highlighted)<EOL>self.body.append('<STR_LIT>')<EOL>self.body.append('<STR_LIT>')<EOL>raise nodes.SkipNode<EOL><DEDENT>else:<EOL><INDENT>self.visit_literal_block(node)<EOL><DEDENT>
Generate HTML for the console directive.