/**
 * Escape markdown-significant characters for safe embedding in wiki pages.
 * Uses backslash escaping (NOT HTML entities).
 */
export function escMd(s) {
    // Escape: \ ` * _ { } [ ] ( ) # + - . ! < >
    return s.replace(/[\\`*_{}\[\]()#+\-.!<>]/g, "\\$&");
}
/**
 * Escape HTML-significant characters for safe embedding in Lens HTML.
 * Uses HTML entity encoding.
 */
export function escHtml(s) {
    return s
        .replace(/&/g, "&amp;")
        .replace(/</g, "&lt;")
        .replace(/>/g, "&gt;")
        .replace(/"/g, "&quot;")
        .replace(/'/g, "&#39;");
}
//# sourceMappingURL=wiki-escape.js.map