"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.escapeRegex = escapeRegex;
exports.removeHtmlAttribute = removeHtmlAttribute;
function escapeRegex(s) {
    return s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
}
/**
 * Removes an HTML attribute and its value from a template string.
 * Handles bound (`[attr]="..."`) and unbound (`attr="..."` or `attr`) forms.
 */
function removeHtmlAttribute(content, attrName) {
    return content.replace(new RegExp(`\\s*\\[?${escapeRegex(attrName)}\\]?(?:\\s*=\\s*"[^"]*")?`, 'g'), '');
}
//# sourceMappingURL=html-utils.js.map