summaryrefslogtreecommitdiff
path: root/doc/_ext
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2009-05-23 11:00:48 -0400
committerNed Batchelder <ned@nedbatchelder.com>2009-05-23 11:00:48 -0400
commitc72eff754646c1a8a54dcf810523b34b0c85ec43 (patch)
treec0fed0c2ceccd6da4fba00f505e6bf4d024e8bc0 /doc/_ext
parent81764c5b59c9bf323aa0bf689301a97d629d8402 (diff)
downloadpython-coveragepy-git-c72eff754646c1a8a54dcf810523b34b0c85ec43.tar.gz
Sphinx experiments getting complicated...
Diffstat (limited to 'doc/_ext')
-rw-r--r--doc/_ext/px_xlator.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/doc/_ext/px_xlator.py b/doc/_ext/px_xlator.py
new file mode 100644
index 00000000..5314f425
--- /dev/null
+++ b/doc/_ext/px_xlator.py
@@ -0,0 +1,18 @@
+from sphinx.writers.html import SmartyPantsHTMLTranslator
+from sphinx.builders.html import StandaloneHTMLBuilder
+
+class PxTranslator(SmartyPantsHTMLTranslator):
+ """Adjust the HTML translator into a .px translator.
+
+ """
+
+ def visit_section(self, node):
+ self.body.append("<!-- PX( -->")
+ SmartyPantsHTMLTranslator.visit_section(self, node)
+ self.body.append("<!-- ) -->")
+
+class PxBuilder(StandaloneHTMLBuilder):
+ def get_target_uri(self, docname, typ=None):
+ import pdb;pdb.set_trace()
+ return docname + self.link_suffix
+ \ No newline at end of file