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