Skip to content

Commit

Permalink
fix: remove meta fixRelativePath
Browse files Browse the repository at this point in the history
  • Loading branch information
makamekm authored and 3y3 committed Apr 23, 2024
1 parent 9f9e117 commit d7fbe36
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/resolvers/md2html.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ const FileTransformer: Record<string, Function> = {
'.md': MdFileTransformer,
};

const fixRelativePath = (relativeTo: string) => (path: string) => {
return join(getAssetsPublicPath(relativeTo), path);
};

const getFileMeta = async ({fileExtension, metadata, inputPath}: ResolverOptions) => {
const {input, allowCustomResources} = ArgvService.getConfig();

Expand All @@ -61,10 +57,9 @@ const getFileMeta = async ({fileExtension, metadata, inputPath}: ResolverOptions

if (allowCustomResources) {
const {script, style} = metadata?.resources || {};
fileMeta.style = (fileMeta.style || []).concat(style || []).map(fixRelativePath(inputPath));
fileMeta.style = (fileMeta.style || []).concat(style || []);
fileMeta.script = (fileMeta.script || [])
.concat(script || [])
.map(fixRelativePath(inputPath));
.concat(script || []);
} else {
fileMeta.style = [];
fileMeta.script = [];
Expand Down

0 comments on commit d7fbe36

Please sign in to comment.