Revision c6793656 lib/build/sphinx_ext.py
b/lib/build/sphinx_ext.py | ||
---|---|---|
63 | 63 |
#: Regular expression for man page names |
64 | 64 |
_MAN_RE = re.compile(r"^(?P<name>[-\w_]+)\((?P<section>\d+)\)$") |
65 | 65 |
|
66 |
_TAB_WIDTH = 2 |
|
67 |
|
|
66 | 68 |
|
67 | 69 |
class ReSTError(Exception): |
68 | 70 |
"""Custom class for generating errors in Sphinx. |
... | ... | |
214 | 216 |
exclude = self.options.get("exclude", None) |
215 | 217 |
alias = self.options.get("alias", {}) |
216 | 218 |
|
217 |
tab_width = 2 |
|
218 | 219 |
path = op_id |
219 | 220 |
include_text = "\n".join(_BuildOpcodeParams(op_id, include, exclude, alias)) |
220 | 221 |
|
221 | 222 |
# Inject into state machine |
222 |
include_lines = docutils.statemachine.string2lines(include_text, tab_width,
|
|
223 |
include_lines = docutils.statemachine.string2lines(include_text, _TAB_WIDTH,
|
|
223 | 224 |
convert_whitespace=1) |
224 | 225 |
self.state_machine.insert_input(include_lines, path) |
225 | 226 |
|
... | ... | |
240 | 241 |
def run(self): |
241 | 242 |
op_id = self.arguments[0] |
242 | 243 |
|
243 |
tab_width = 2 |
|
244 | 244 |
path = op_id |
245 | 245 |
include_text = _BuildOpcodeResult(op_id) |
246 | 246 |
|
247 | 247 |
# Inject into state machine |
248 |
include_lines = docutils.statemachine.string2lines(include_text, tab_width,
|
|
248 |
include_lines = docutils.statemachine.string2lines(include_text, _TAB_WIDTH,
|
|
249 | 249 |
convert_whitespace=1) |
250 | 250 |
self.state_machine.insert_input(include_lines, path) |
251 | 251 |
|
Also available in: Unified diff