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

reduce use of compound suffixes - adjust Path.suffix to split at last dot #526

Merged
merged 1 commit into from
Sep 13, 2023

Conversation

jenshalm
Copy link
Contributor

@jenshalm jenshalm commented Sep 13, 2023

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

  1. 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.

  2. 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.

Fixes #517

@jenshalm jenshalm added this to the 1.0.0-M5 milestone Sep 13, 2023
@jenshalm jenshalm merged commit 6207f4b into main Sep 13, 2023
21 checks passed
@jenshalm jenshalm deleted the api/path-suffix branch September 13, 2023 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invalid Parsing of Filenames with multiple period characters in 0.19.3
1 participant