// This method remove the raw HTML but reserve the HTML wrapped by ``. // e.g. // Input: " b", Output: "b" // Input: "`` b", Output: "`` b" export = function removeNonCodeWrappedHTML (str: string): string { return String(str).replace(/(^|[^><`\\])<.*>([^><`]|$)/g, '$1$2') }