This PR joins two pieces of work that would normally be delivered in separate PRs, but the nature of the required changes made that difficult, thus this joint PR.
Changes in Behaviour
Path.suffix now splits on the last dot, like most other APIs. This addresses issues where this behaviour did not meet user expectations, but also actual bugs that could occur when input sources contain multiple dots in the file name.
The suffixes .epub.css and .epub.js do no longer have a special meaning in Laika. Previously they marked these files as "to be used for EPUB output only" and likewise marked all .css and .js files without this compound suffix as "for HTML output only". This type of compound suffix was directly supported in Path.suffix, causing the unexpected behaviour. But it was also overlapping/conflicting with an existing feature, which is to use HOCON to specify the output format the files contained in a directory should be included for (e.g. laika.targetFormats = [html, pdf]). The latter is now the only means to limit the output format for input sources.
This PR joins two pieces of work that would normally be delivered in separate PRs, but the nature of the required changes made that difficult, thus this joint PR.
Changes in Behaviour
Path.suffix
now splits on the last dot, like most other APIs. This addresses issues where this behaviour did not meet user expectations, but also actual bugs that could occur when input sources contain multiple dots in the file name.The suffixes
.epub.css
and.epub.js
do no longer have a special meaning in Laika. Previously they marked these files as "to be used for EPUB output only" and likewise marked all.css
and.js
files without this compound suffix as "for HTML output only". This type of compound suffix was directly supported inPath.suffix
, causing the unexpected behaviour. But it was also overlapping/conflicting with an existing feature, which is to use HOCON to specify the output format the files contained in a directory should be included for (e.g.laika.targetFormats = [html, pdf]
). The latter is now the only means to limit the output format for input sources.Fixes #517