diff --git a/xml2rfc/run.py b/xml2rfc/run.py index 5c7fb7d7a..1a76d97a5 100755 --- a/xml2rfc/run.py +++ b/xml2rfc/run.py @@ -315,6 +315,8 @@ def main(): help=configargparse.SUPPRESS), htmloptions.add_argument('--no-inline-version-info', action='store_false', dest="inline_version_info", help=configargparse.SUPPRESS), + htmloptions.add_argument('--no-rfc-local', action='store_false', dest='rfc_local', default=True, + help='Do not link to rfc-local.css') v2v3options = optionparser.add_argument_group('V2-V3 Converter Options') v2v3options.add_argument('--add-xinclude', action='store_true', diff --git a/xml2rfc/writers/base.py b/xml2rfc/writers/base.py index 5b3af9d06..22e092bde 100644 --- a/xml2rfc/writers/base.py +++ b/xml2rfc/writers/base.py @@ -100,6 +100,7 @@ 'raw': False, 'rfc': None, 'rfc_base_url': 'https://www.rfc-editor.org/rfc/', + 'rfc_local': True, 'rfc_reference_base_url': 'https://rfc-editor.org/rfc/', 'silence': default_silenced_messages, 'skip_config_files': False, diff --git a/xml2rfc/writers/html.py b/xml2rfc/writers/html.py index c694dc27e..58c90de0d 100644 --- a/xml2rfc/writers/html.py +++ b/xml2rfc/writers/html.py @@ -574,7 +574,7 @@ def render_rfc(self, h, x): else: add.style(head, None, css, type="text/css") - if not (self.options.pdf and not os.path.exists('rfc-local.css')): + if self.options.rfc_local and (not self.options.pdf or os.path.exists('rfc-local.css')): add.link(head, None, href="rfc-local.css", rel="stylesheet", type="text/css") # 6.3.7. Links