]> git.sommitrealweird.co.uk Git - sommitrealweird.git/blob - sommitrealweird/generic/docutils_xhtml11.py
Stop ReST from dropping the primary title if it's the first title in the document.
[sommitrealweird.git] / sommitrealweird / generic / docutils_xhtml11.py
1 # Author: Brett Parker <iDunno@sommitrealweird.co.uk>
2
3 """
4 HTML1.1 Writer.
5 """
6
7 __docformat__ = 'reStructuredText'
8
9 import sys
10 import os
11 import os.path
12 import codecs
13 import docutils
14 from docutils import frontend, nodes, utils, writers
15 from docutils.writers import html4css1
16
17 class Writer(html4css1.Writer):
18
19     config_section = 'xhtml11 writer'
20     config_section_dependencies = ('writers', 'html4css1 writer')
21
22     def __init__(self):
23         html4css1.Writer.__init__(self)
24         self.translator_class = HTMLTranslator
25
26 class HTMLTranslator(html4css1.HTMLTranslator):
27
28     def is_compactable(self, node):
29         return False
30
31     def should_be_compact_paragraph(self, node):
32         return False