summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Peveler <matt.peveler@gmail.com>2021-02-05 20:58:58 -0500
committerGitHub <noreply@github.com>2021-02-05 20:58:58 -0500
commit289c42d179be0bf665cca9b618fb282384175c4f (patch)
tree6d6239e1d27c498af377d1fe8022e534094b8bf0
parent1cdafdb1b7020a0595537a11e98f9768ba9b7bbd (diff)
downloadasciidoc-py3-289c42d179be0bf665cca9b618fb282384175c4f.tar.gz
set --catalogs for xmllint if SGML_CATALOG_FILES env is set (#172)
Signed-off-by: Matthew Peveler <matt.peveler@gmail.com>
-rw-r--r--asciidoc/a2x.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/asciidoc/a2x.py b/asciidoc/a2x.py
index 4ba261e..4e9d363 100644
--- a/asciidoc/a2x.py
+++ b/asciidoc/a2x.py
@@ -677,7 +677,10 @@ class A2X(AttrDict):
options.append(('--out-file', docbook_file))
asciidoc.cli(flatten(['asciidoc'] + options + [self.asciidoc_file]))
if not self.no_xmllint and XMLLINT:
- shell('"%s" --nonet --noout --valid "%s"' % (XMLLINT, docbook_file))
+ xmllint_options = ['--nonet', '--noout', '--valid']
+ if 'SGML_CATALOG_FILES' in os.environ:
+ xmllint_options.append('--catalogs')
+ shell('"%s" %s "%s"' % (XMLLINT, " ".join(xmllint_options), docbook_file))
def to_xhtml(self):
self.to_docbook()