attrs-version:
type: string
default: ""
+ docutils-version:
+ type: string
+ default: ""
matplotlib-version:
type: string
default: ""
name: Install Python dependencies
# Pygments 2.11 (and apparently 2.10 as well) treats certain whitespace
# differently, I have to update the expected output first.
- # Docutils 0.18 drops some attribute that htmlsanity relies on, I need
- # to update the code first.
command: |
- pip install jinja2 docutils==0.17.1 pygments==2.9.0 pelican<< parameters.pelican-version >> Pyphen Pillow coverage codecov qrcode matplotlib<< parameters.matplotlib-version >> attrs<< parameters.attrs-version >>
+ pip install jinja2 docutils<< parameters.docutils-version >> pygments==2.9.0 pelican<< parameters.pelican-version >> Pyphen Pillow coverage codecov qrcode matplotlib<< parameters.matplotlib-version >> attrs<< parameters.attrs-version >>
- run:
name: Fix unheard-of cursed issues
# otherwise i get Error: unsupported locale setting
attrs-version: ==19.3.0
matplotlib-version: ==3.3.4
pelican-version: ==4.2.0
+ # Ubuntu 18.04 has docutils 0.14
+ docutils-version: ==0.14
- checkout
- test-theme
- test-plugins
# Matplotlib 3.5 has significantly different output, be sure to have
# at least one job testing 3.4 so we don't regress
matplotlib-version: ==3.4.3
+ # Docutils 0.17 dropped `object_image_types`, test that it works there
+ docutils-version: ==0.17.1
- checkout
- test-theme
- test-plugins
steps:
- install-base:
extra: graphviz cmake ninja-build wget
- - install-python-deps
+ - install-python-deps:
+ # Docutils 0.18.0 dropped `in_footnote_list` and made some changes that
+ # 0.18.1 reverted again, test we're not affected by those
+ docutils-version: ==0.18.0
- checkout
- test-theme
- test-plugins
# Footnote list. Replacing the classes with just .m-footnote.
def visit_footnote(self, node):
- if not self.in_footnote_list:
+ previous_node = node.parent[node.parent.index(node)-1]
+ if not isinstance(previous_node, type(node)):
self.body.append('<dl class="m-footnote">\n')
- self.in_footnote_list = True
def depart_footnote(self, node):
self.body.append('</dd>\n')
if not isinstance(node.next_node(descend=False, siblings=True),
- nodes.footnote):
+ type(node)):
self.body.append('</dl>\n')
- self.in_footnote_list = False
# Footnote reference
def visit_footnote_reference(self, node):
'M_FINE_PRINT': None,
'M_DISABLE_SOCIAL_META_TAGS': True,
'DIRECT_TEMPLATES': [],
- 'SLUGIFY_SOURCE': 'basename'
+ 'SLUGIFY_SOURCE': 'basename',
+
+ 'DOCUTILS_SETTINGS': {
+ # Default changed to '%' in 0.18, keep the old setting to
+ # have consistent output across versions
+ # TODO maybe change this to '%' everywhere instead?
+ 'auto_id_prefix': 'id'
+ }
}
implicit_settings.update(settings)
settings = read_settings(path=None, override=implicit_settings)