Very Popular
Latest
import { unescapeEntity } from './unescape.ts'import { assert } from './utils.ts'
Deno.test('unescape', () => { const testCases = [ { input: ` <h4 id="TOC_1.">Thank you for the amazing response!</h4>
 <p>In 2020, we had another great turnout with 9,648 responses, about <a href="https://blog.golang.org/survey2020-results" target="_blank" rel="noopener">as many as 2019</a> `.trim(), expected: ` <h4 id="TOC_1.">Thank you for the amazing response!</h4> <p>In 2020, we had another great turnout with 9,648 responses, about <a href="https://blog.golang.org/survey2020-results" target="_blank" rel="noopener">as many as 2019</a> `.trim(), }, ] testCases.forEach(t => assert(unescapeEntity(t.input) === t.expected))})