2024-02-12 07:25:29 -05:00
|
|
|
import assert from 'node:assert/strict';
|
|
|
|
import { before, describe, it } from 'node:test';
|
2023-09-14 05:22:16 -05:00
|
|
|
import { createMarkdownProcessor } from '../dist/index.js';
|
2022-07-26 16:31:57 -05:00
|
|
|
|
2023-09-14 05:22:16 -05:00
|
|
|
describe('entities', async () => {
|
2024-02-12 07:25:29 -05:00
|
|
|
let processor;
|
|
|
|
|
|
|
|
before(async () => {
|
|
|
|
processor = await createMarkdownProcessor();
|
|
|
|
});
|
2023-09-14 05:22:16 -05:00
|
|
|
|
2022-08-05 09:23:16 -05:00
|
|
|
it('should not unescape entities in regular Markdown', async () => {
|
2024-02-12 07:25:29 -05:00
|
|
|
const markdown = `<i>This should NOT be italic</i>`;
|
|
|
|
const { code } = await processor.render(markdown);
|
2022-07-26 16:31:57 -05:00
|
|
|
|
2024-02-12 07:25:29 -05:00
|
|
|
assert.equal(code, `<p><i>This should NOT be italic</i></p>`);
|
2022-07-26 16:31:57 -05:00
|
|
|
});
|
|
|
|
});
|