aboutsummaryrefslogtreecommitdiff
path: root/packages/markdown/remark/test/entities.test.js
diff options
context:
space:
mode:
authorGravatar github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> 2025-06-05 14:25:23 +0000
committerGravatar github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> 2025-06-05 14:25:23 +0000
commite586d7d704d475afe3373a1de6ae20d504f79d6d (patch)
tree7e3fa24807cebd48a86bd40f866d792181191ee9 /packages/markdown/remark/test/entities.test.js
downloadastro-latest.tar.gz
astro-latest.tar.zst
astro-latest.zip
Sync from a8e1c0a7402940e0fc5beef669522b315052df1blatest
Diffstat (limited to 'packages/markdown/remark/test/entities.test.js')
-rw-r--r--packages/markdown/remark/test/entities.test.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/packages/markdown/remark/test/entities.test.js b/packages/markdown/remark/test/entities.test.js
new file mode 100644
index 000000000..3c244c15a
--- /dev/null
+++ b/packages/markdown/remark/test/entities.test.js
@@ -0,0 +1,18 @@
+import assert from 'node:assert/strict';
+import { before, describe, it } from 'node:test';
+import { createMarkdownProcessor } from '../dist/index.js';
+
+describe('entities', async () => {
+ let processor;
+
+ before(async () => {
+ processor = await createMarkdownProcessor();
+ });
+
+ it('should not unescape entities in regular Markdown', async () => {
+ const markdown = `&lt;i&gt;This should NOT be italic&lt;/i&gt;`;
+ const { code } = await processor.render(markdown);
+
+ assert.equal(code, `<p>&#x3C;i>This should NOT be italic&#x3C;/i></p>`);
+ });
+});