From c984d08dae206ae5f65176378e77efb852a278af Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Tue, 30 Mar 2021 12:42:04 -0400 Subject: [PATCH] Cleanup: Use page_source_suffix (#1104) Use `page_source_suffix` instead of checking `source_suffix` Since we now require sphinx 1.6 we can cleanup this old workaround for old sphinx versions. --- sphinx_rtd_theme/breadcrumbs.html | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/sphinx_rtd_theme/breadcrumbs.html b/sphinx_rtd_theme/breadcrumbs.html index 0ec35f50..722e266b 100644 --- a/sphinx_rtd_theme/breadcrumbs.html +++ b/sphinx_rtd_theme/breadcrumbs.html @@ -1,11 +1,3 @@ -{#- Support for Sphinx 1.3+ page_source_suffix, but don't break old builds. #} - -{%- if page_source_suffix %} - {%- set suffix = page_source_suffix %} -{%- else %} - {%- set suffix = source_suffix %} -{%- endif %} - {%- if meta is defined and meta is not none %} {%- set check_meta = True %} {%- else %} @@ -43,24 +35,24 @@ {{ _('Edit on GitHub') }} {%- else %} - {{ _('Edit on GitHub') }} + {{ _('Edit on GitHub') }} {%- endif %} {%- elif display_bitbucket %} {%- if check_meta and 'bitbucket_url' in meta %} {{ _('Edit on Bitbucket') }} {%- else %} - {{ _('Edit on Bitbucket') }} + {{ _('Edit on Bitbucket') }} {%- endif %} {%- elif display_gitlab %} {%- if check_meta and 'gitlab_url' in meta %} {{ _('Edit on GitLab') }} {%- else %} - {{ _('Edit on GitLab') }} + {{ _('Edit on GitLab') }} {%- endif %} {%- elif show_source and source_url_prefix %} - {{ _('View page source') }} + {{ _('View page source') }} {%- elif show_source and has_source and sourcename %} {{ _('View page source') }} {%- endif %}