File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -232,16 +232,21 @@ export class Brand {
232232 return fonts ?? [ ] ;
233233 }
234234
235+ // does typst want forward-slash paths?
236+ relativePath ( path : string ) : string {
237+ const pathPrefix = relative ( this . projectDir , this . brandDir ) ;
238+ return join ( pathPrefix , path ) . replace ( "\\" , "/" ) ;
239+ }
240+
235241 getLogoResource ( name : string ) : BrandLogoExplicitResource {
236242 const entry = this . data . logo ?. images ?. [ name ] ;
237243 if ( ! entry ) {
238244 return { path : name } ;
239245 }
240- const pathPrefix = relative ( this . projectDir , this . brandDir ) ;
241246 if ( typeof entry === "string" ) {
242- return { path : join ( pathPrefix , entry ) } ;
247+ return { path : this . relativePath ( entry ) } ;
243248 }
244- entry . path = join ( pathPrefix , entry . path ) ;
249+ entry . path = this . relativePath ( entry . path ) ;
245250 return entry ;
246251 }
247252
You can’t perform that action at this time.
0 commit comments