Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/quarto-brand/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ repository.workspace = true
description = "Parse and resolve `_brand.yml` brand configuration for Quarto"

[dependencies]
quarto-util = { workspace = true }
serde = { workspace = true }
serde_yaml = { workspace = true }
thiserror = { workspace = true }
Expand Down
4 changes: 2 additions & 2 deletions crates/quarto-brand/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -535,10 +535,10 @@ impl BrandLogoResource {
/// paths and `http(s)://` URLs are left unchanged.
pub fn with_path_relative_to(&self, base: &Path) -> Self {
let raw = self.path();
let resolved = if is_external_url(raw) || Path::new(raw).is_absolute() {
let resolved = if is_external_url(raw) || quarto_util::is_rooted(Path::new(raw)) {
raw.to_string()
} else {
base.join(raw).to_string_lossy().into_owned()
quarto_util::to_forward_slashes(&base.join(raw))
};
match self {
BrandLogoResource::Path(_) => BrandLogoResource::Path(resolved),
Expand Down
Loading