Problem 1

Description:

When using "CSS mode for syntax highlighting" as "Inline CSS style attributes" the language specific syntax highligh works as expected while "Generic syntax highlighting tags"(e.g: code) are not styled because geshifilter/geshifilter library is included only when "Use CSS classes and an automatically managed external CSS style sheet" is selected.

Solution:

Include geshifilter/geshifilter library for both: Inline "CSS style attributes" and "Use CSS classes and an automatically managed external CSS stylesheet" modes

Problem 2

Description:

Steps to reproduce:
- Select "Use CSS classes and an automatically managed external CSS stylesheet" mode for "CSS mode for syntax highlighting"
Language CSS file is generated and served on pages as expected.
- Select "Inline CSS style attributes" mode for "CSS mode for syntax highlighting";
While the styles are now generated inline the Language CSS file is still included in the markup.

Solution:

Add the Language CSS file only if "Use CSS classes and an automatically managed external CSS stylesheet" mode is selected.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

hugronaphor created an issue. See original summary.

hugronaphor’s picture

Attached patch aims to fix both problems.

hugronaphor’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 2: geshifilter-css_include-2671530-2-d8.patch, failed testing.

yukare’s picture

Status: Needs work » Needs review
FileSize
5.68 KB

I updated the patch, as it does not apply due to some changes.
And I add some tests, so this will not occur again.
Please review it if it fix everything.

  • yukare authored d0e7845 on 8.x-1.x
    Issue #2671530 by hugronaphor, yukare: CSS files are/not included when...
yukare’s picture

Status: Needs review » Fixed

Fixed with the commit.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.