export type EditPostVariables = { hooks?: string; database?: string; templates?: string; contributors?: string; }; export const editPostHTML = ( postContent: string, postVariables: EditPostVariables ) => { return postContent.replaceAll( /.*?/gm, ( match, key: string ) => { return `${ postVariables[ key as keyof EditPostVariables ] || '' }`; } ); };