diff options
author | Matthew Peveler <matt.peveler@gmail.com> | 2021-02-06 02:01:01 +0000 |
---|---|---|
committer | Matthew Peveler <matt.peveler@gmail.com> | 2021-02-06 02:01:01 +0000 |
commit | 4d3e330fedbf08be369fb5a148966362029137eb (patch) | |
tree | 88c095a6dbaeaa86c2a951474526baa3e41bdd56 | |
parent | 30d33906adf442e79aed3c15979225ef793138b3 (diff) | |
download | asciidoc-py3-4d3e330fedbf08be369fb5a148966362029137eb.tar.gz |
set --catalogs for xmllint if SGML_CATALOG_FILES env is set
Backport of 289c42d179be0bf665cca9b618fb282384175c4f (#172)
Signed-off-by: Matthew Peveler <matt.peveler@gmail.com>
-rwxr-xr-x | a2x.py | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -699,7 +699,10 @@ class A2X(AttrDict): shell('"%s" --backend docbook -a "a2x-format=%s" %s --out-file "%s" "%s"' % (self.asciidoc, self.format, self.asciidoc_opts, docbook_file, 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() |