UNPKG

leasot

Version:

Parse and output TODOs and FIXMEs from comments in your files

11 lines (10 loc) 424 B
import { getRegex } from '../utils/index.js'; import { extractSingleLineComments } from '../utils/comments.js'; const parserFactory = ({ customTags }) => { const regex = getRegex(customTags); const lineCommentRegex = new RegExp(`{{!(?:--)?${regex}(?:--)?}}`, 'mig'); return (contents, file) => { return extractSingleLineComments(contents, file, lineCommentRegex); }; }; export default parserFactory;