org-reveal icon indicating copy to clipboard operation
org-reveal copied to clipboard

Adding multiple stylesheets with EXPORT_REVEAL_EXTRA_CSS property does not work as expected

Open pingebat opened this issue 2 years ago • 0 comments

Declaring multiple extra scripts can be done with the REVEAL_EXTRA_SCRIPT_BEFORE_SRC and REVEAL_EXTRA_SCRIPT_SRC properties by handing over the file names as a simple whitespace seperated "list" like in the example below.

*** Presentation
    :PROPERTIES:
    :EXPORT_REVEAL_HLEVEL: 1
    :EXPORT_REVEAL_THEME: simple
    :EXPORT_REVEAL_REVEAL_JS_VERSION: 4
    :EXPORT_REVEAL_EXTRA_SCRIPT_BEFORE_SRC: scripts/script1.js scripts/script2.js
    :EXPORT_REVEAL_EXTRA_CSS: stylesheets/style2.css stylesheets/style1.css
    :END

However, adding multiple stylesheets with the EXPORT_REVEAL_EXTRA_CSS property behaves differently. Here the whitespace seperated list is interpreted as one string. And results in the output

<link rel="stylesheet" href="stylesheets/style1.css stylesheets/style2.css">

insteaf of:

<link rel="stylesheet" href="stylesheets/style1.css">
<link rel="stylesheet" href="stylesheets/style2.css">

By changing the splitting character "\n" on line 675 in ox-reveal.el to " " I was able to produce the expected behaviour.

I did not make a pull request because I am not sure if this is the right way to fix it. There is also the possibilty that I missed the right way to achieve what I am trying to do. Either way, maybe someone more knowledgeable can weigh in on this.

pingebat avatar Feb 24 '23 13:02 pingebat