santifer/career-ops · error · Error
Unknown template format: ${format}
Error message
Unknown template format: ${format} What it means
Error "Unknown template format: ${format}" thrown in santifer/career-ops.
Source
Thrown at cv-sections-core.mjs:111
projects: new RegExp(String.raw`%{4,}\s+PROJECTS\s+%{4,}[\s\S]*?` + TEX_BOUNDARY),
education: new RegExp(String.raw`%{4,}\s+Education\s+%{4,}[\s\S]*?` + TEX_BOUNDARY),
awards: new RegExp(String.raw`%{4,}\s+AWARDS\s+%{4,}[\s\S]*?` + TEX_BOUNDARY),
skills: new RegExp(String.raw`%{4,}\s+Technical Skills\s+%{4,}[\s\S]*?` + TEX_END_SENTINEL),
},
};
export const OPTIONAL_SECTIONS = ['competencies', 'projects', 'education', 'certifications', 'awards', 'skills'];
export function isEmptySection(payload, section) {
const entries = payload?.[section];
return !Array.isArray(entries) || entries.length === 0;
}
// Remove every optional section that has no entries in `payload`. Returns the
// template unchanged when both are populated.
export function stripEmptySections(template, payload, format) {
const patterns = PATTERNS[format];
if (!patterns) throw new Error(`Unknown template format: ${format}`);
let out = template;
for (const section of OPTIONAL_SECTIONS) {
const pattern = patterns[section];
if (!pattern) continue; // this format's template has no marker for this section
if (isEmptySection(payload, section)) {
// A non-matching pattern is a no-op here by design — see the Skills
// sentinel note above: no sentinel means no strip, never a fallback to
// a looser boundary.
out = out.replace(pattern, '');
}
}
return out;
}
View on GitHub (pinned to 9b17a8ac97)
Solutions
- Use a supported template format (html or tex).
- Check for a typo in the format name passed to the template loader.
Example fix
format: html
When it happens
Trigger: Thrown at cv-sections-core.mjs:111 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of santifer/career-ops@9b17a8ac97 (2026-08-13).
Data as JSON: /api/errors/aba5e1cebe2553e7.
Report an issue: GitHub.