<s> """<STR_LIT>""" <EOL> from docutils import nodes <EOL> from sphinx . writers . html import HTMLTranslator <EOL> from . import _simple , _tabs <EOL> def setup ( app ) : <EOL> """<STR_LIT>""" <EOL> for module in [ _simple , _tabs ] : <EOL> module . setup ( app ) <EOL> class HTMLWriter ( HTMLTranslator ) : <EOL> """<STR_LIT>""" <EOL> def visit_table ( self , node ) : <EOL> """<STR_LIT>""" <EOL> self . _table_row_index = <NUM_LIT:0> <EOL> self . context . append ( self . compact_p ) <EOL> self . compact_p = True <EOL> classes = '<STR_LIT:U+0020>' . join ( [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , <EOL> self . settings . table_style ] ) . strip ( ) <EOL> self . body . append ( <EOL> self . starttag ( node , '<STR_LIT>' , CLASS = classes , border = "<STR_LIT:0>" ) ) <EOL> def visit_entry ( self , node ) : <EOL> """<STR_LIT>""" <EOL> atts = { '<STR_LIT:class>' : [ ] } <EOL> if isinstance ( node . parent . parent , nodes . thead ) : <EOL> atts [ '<STR_LIT:class>' ] . append ( '<STR_LIT>' ) <EOL> if node . parent . parent . parent . stubs [ node . parent . column ] : <EOL> atts [ '<STR_LIT:class>' ] . append ( '<STR_LIT>' ) <EOL> if atts [ '<STR_LIT:class>' ] : <EOL> tagname = '<STR_LIT>' <EOL> atts [ '<STR_LIT:class>' ] = '<STR_LIT:U+0020>' . join ( atts [ '<STR_LIT:class>' ] ) <EOL> else : <EOL> tagname = '<STR_LIT>' <EOL> del atts [ '<STR_LIT:class>' ] <EOL> node . parent . column += <NUM_LIT:1> <EOL> if '<STR_LIT>' in node : <EOL> atts [ '<STR_LIT>' ] = node [ '<STR_LIT>' ] + <NUM_LIT:1> <EOL> if '<STR_LIT>' in node : <EOL> atts [ '<STR_LIT>' ] = node [ '<STR_LIT>' ] + <NUM_LIT:1> <EOL> node . parent . column += node [ '<STR_LIT>' ] <EOL> self . body . append ( self . starttag ( node , tagname , '<STR_LIT>' , ** atts ) ) <EOL> self . body . append ( self . starttag ( node , '<STR_LIT:p>' , '<STR_LIT>' , dict ( ) ) ) <EOL> self . context . append ( '<STR_LIT>' % tagname . lower ( ) ) <EOL> if len ( node ) == <NUM_LIT:0> : <EOL> self . body . append ( '<STR_LIT>' ) <EOL> self . set_first_last ( node ) </s>
