diff options
author | Stewart Smith <stewart@linux.vnet.ibm.com> | 2016-10-28 16:00:03 +1100 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2016-10-28 17:07:47 +1100 |
commit | 91350c5a926795d8917a4eff699941361f780476 (patch) | |
tree | 245f5ef5afc3a7c58f71d7d8b7450c25b8ce14f5 /doc/conf.py | |
parent | 0560492933ef232d0f5eed9885fd9490453ef548 (diff) | |
download | skiboot-91350c5a926795d8917a4eff699941361f780476.zip skiboot-91350c5a926795d8917a4eff699941361f780476.tar.gz skiboot-91350c5a926795d8917a4eff699941361f780476.tar.bz2 |
doc: enable syntax highlighting of Device Tree Source (dts)
Unlike the rest of skiboot, DtsLexer.py is BSD licensed as it
should go into the pygments project (Python library for doing
syntax highlighting which is used by Sphinx).
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'doc/conf.py')
-rw-r--r-- | doc/conf.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/doc/conf.py b/doc/conf.py index eceaa3f..1fe22e0 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -18,13 +18,19 @@ import os # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. -#sys.path.insert(0, os.path.abspath('.')) +sys.path.insert(0, os.path.abspath('.')) # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. #needs_sphinx = '1.0' +from DtsLexer import DtsLexer + +def setup(app): + from sphinx.highlighting import lexers + lexers['dts'] = DtsLexer() + # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. |