Mercurial > hg
comparison doc/hgmanpage.py @ 14633:cdda48c93676
hgmanpage: adapt to Docutils 0.8 API change
author | Satish Balay <balay@fastmail.fm> |
---|---|
date | Thu, 16 Jun 2011 19:34:42 +0200 |
parents | 4c50552fc9bc |
children | a7d5816087a9 |
comparison
equal
deleted
inserted
replaced
14632:4819241ec1ad | 14633:cdda48c93676 |
---|---|
46 | 46 |
47 import re | 47 import re |
48 | 48 |
49 from docutils import nodes, writers, languages | 49 from docutils import nodes, writers, languages |
50 import roman | 50 import roman |
51 import inspect | |
51 | 52 |
52 FIELD_LIST_INDENT = 7 | 53 FIELD_LIST_INDENT = 7 |
53 DEFINITION_LIST_INDENT = 7 | 54 DEFINITION_LIST_INDENT = 7 |
54 OPTION_LIST_INDENT = 7 | 55 OPTION_LIST_INDENT = 7 |
55 BLOCKQOUTE_INDENT = 3.5 | 56 BLOCKQOUTE_INDENT = 3.5 |
158 | 159 |
159 def __init__(self, document): | 160 def __init__(self, document): |
160 nodes.NodeVisitor.__init__(self, document) | 161 nodes.NodeVisitor.__init__(self, document) |
161 self.settings = settings = document.settings | 162 self.settings = settings = document.settings |
162 lcode = settings.language_code | 163 lcode = settings.language_code |
163 self.language = languages.get_language(lcode) | 164 arglen = len(inspect.getargspec(languages.get_language)[0]) |
165 if arglen == 2: | |
166 self.language = languages.get_language(lcode, | |
167 self.document.reporter) | |
168 else: | |
169 self.language = languages.get_language(lcode) | |
164 self.head = [] | 170 self.head = [] |
165 self.body = [] | 171 self.body = [] |
166 self.foot = [] | 172 self.foot = [] |
167 self.section_level = 0 | 173 self.section_level = 0 |
168 self.context = [] | 174 self.context = [] |