Example #1
0
File: html.py Project: evhub/sphinx
 def should_be_compact_paragraph(self, node):
     """Determine if the <p> tags around paragraph can be omitted."""
     if isinstance(node.parent, addnodes.desc_content):
         # Never compact desc_content items.
         return False
     if isinstance(node.parent, addnodes.versionmodified):
         # Never compact versionmodified nodes.
         return False
     return BaseTranslator.should_be_compact_paragraph(self, node)
Example #2
0
 def should_be_compact_paragraph(self, node):
     if self.document.children == [node]:
         return True
     else:
         return HTMLTranslator.should_be_compact_paragraph(self, node)
Example #3
0
 def should_be_compact_paragraph(self, node):
     if self.document.children == [node]:
         return True
     else:
         return HTMLTranslator.should_be_compact_paragraph(self, node)