@jsverse/transloco-keys-manager
Version:
Extract translatable keys from projects that uses Transloco
12 lines • 464 B
JavaScript
import { sanitizeForRegex } from './string.utils.js';
export const regexFactoryMap = {
ts: {
comments: () => /\/\*\*[^]+?\*\//g,
},
template: {
comments: () => /<!--[^]+?-->/g,
validateComment: (marker) => new RegExp(`<!--(\\s*${sanitizeForRegex(marker)}\\(([^)]+)\\)\\s*)+\\s*-->`),
},
markerValues: (marker) => new RegExp(`\\b${sanitizeForRegex(marker)}\\(([^)]+)\\)`, 'g'),
};
//# sourceMappingURL=regexs.utils.js.map