Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
/** The HTML entities models write in place of characters, and the characters. */
export const HTML_ENTITIES: Readonly<Record<string, string>> = {
'&': '&',
' ': ' ',
'<': '<',
'>': '>',
'"': '"',
'©': '©',
'®': '®',
'™': '™',
};
const ENTITY = new RegExp(Object.keys(HTML_ENTITIES).join('|'), 'gi');
/** `text` with each entity read once as its character, so `&lt;` stays `<`. */
export function decodeHtmlEntities(text: string): string {
return text.replace(
ENTITY,
(entity) => HTML_ENTITIES[entity.toLowerCase()] ?? entity
);
}