Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

html: fix missing reverting when adding css files to specific page #9167

Merged
merged 1 commit into from
May 4, 2021
Merged

html: fix missing reverting when adding css files to specific page #9167

merged 1 commit into from
May 4, 2021

Conversation

bonartm
Copy link
Contributor

@bonartm bonartm commented May 3, 2021

Feature or Bugfix

  • Bugfix

Purpose

fix missing reverting when adding css files via app.add_css_file on html-page-context event

Detail

  • currently stylesheet tags are repeated in the rendered html on every subsequent page
  • see the minimal example that reproduces the bug. the rendered page contains the same test.css three times
  • with every new page and a corresponding directive the css file is added again although it is already there. this does not happen with js files added to the page (e.g. the test.js in the example).
  • adding the underscore as it was done for js files solves this bug

Relates

@tk0miya tk0miya added this to the 4.0.0 milestone May 4, 2021
Copy link
Member

@tk0miya tk0miya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Could you rebase this into the 4.0.x branch?

fix missing reverting when adding css files via app.add_css_file in a html-page-context event
@bonartm bonartm changed the base branch from 4.x to 4.0.x May 4, 2021 06:45
@bonartm bonartm requested a review from tk0miya May 4, 2021 06:48
@tk0miya
Copy link
Member

tk0miya commented May 4, 2021

Thank you for quick update! I'll merge this just after CI passed :-)

@tk0miya tk0miya merged commit a0d6036 into sphinx-doc:4.0.x May 4, 2021
tk0miya added a commit that referenced this pull request May 4, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants