From adca273565f565fa46696277eaccfa3bc62fff28 Mon Sep 17 00:00:00 2001 From: Lindsey Heagy Date: Sun, 31 Jan 2016 12:46:24 -0800 Subject: [PATCH] ignore nonlocal images in sphinx build --- docs/conf.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/conf.py b/docs/conf.py index fee262de..10a25e7b 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -251,3 +251,15 @@ texinfo_documents = [ #texinfo_show_urls = 'footnote' autodoc_member_order = 'bysource' + + +# -- User Defined ------------------------------------------------ +import sphinx.environment +from docutils.utils import get_source_line + +# supress nonlocal image warn +def _supress_nonlocal_image_warn(self, msg, node): + if not msg.startswith('nonlocal image URI found:'): + self._warnfunc(msg, '%s:%s' % get_source_line(node)) + +sphinx.environment.BuildEnvironment.warn_node = _supress_nonlocal_image_warn