diff options
author | Ben Gamari <bgamari.foss@gmail.com> | 2016-01-04 16:43:02 +0100 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2016-01-04 16:43:03 +0100 |
commit | 5c10f5ce8831a59f67f2c42ed5d7cf5be10c0860 (patch) | |
tree | fb82852ab9afa3cc796fc436fb2924f007d77fac /docs/users_guide/conf.py | |
parent | da0f04305d7bdc172f7a7a7b73f171b83acca87f (diff) | |
download | haskell-5c10f5ce8831a59f67f2c42ed5d7cf5be10c0860.tar.gz |
users_guide: Add ghci-cmd directive
Note only does this make the markup cleaner and more semantic, but it
clears up some warnings and enables proper hyperlinks. Yay Sphinx!
While I was at it I generally cleaned up the markup
Test Plan: Read it
Reviewers: hvr, thomie, austin
Differential Revision: https://phabricator.haskell.org/D1730
Diffstat (limited to 'docs/users_guide/conf.py')
-rw-r--r-- | docs/users_guide/conf.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/users_guide/conf.py b/docs/users_guide/conf.py index e7c203b5b7..f7c6c14672 100644 --- a/docs/users_guide/conf.py +++ b/docs/users_guide/conf.py @@ -110,3 +110,17 @@ texinfo_documents = [ u'GHC Team', 'GHCUsersGuide', 'The Glasgow Haskell Compiler.', 'Compilers'), ] + +def parse_ghci_cmd(env, sig, signode): + from sphinx import addnodes + name = sig.split(';')[0] + sig = sig.replace(';', '') + signode += addnodes.desc_name(name, sig) + return name + +def setup(app): + # the :ghci-cmd: directive used in ghci.rst + app.add_object_type('ghci-cmd', 'ghci-cmd', + parse_node=parse_ghci_cmd, + objname='GHCi command', + indextemplate='pair: %s; GHCi command') |