|
|
@ -1,3 +1,4 @@
|
|
|
|
|
|
|
|
/* eslint-disable no-irregular-whitespace */
|
|
|
|
import { describe, expect, test } from "@jest/globals";
|
|
|
|
import { describe, expect, test } from "@jest/globals";
|
|
|
|
import { unescape } from "lodash-es";
|
|
|
|
import { unescape } from "lodash-es";
|
|
|
|
import { marked } from ".";
|
|
|
|
import { marked } from ".";
|
|
|
@ -170,4 +171,17 @@ text below the table
|
|
|
|
expect(unescape(marked(t.markdown))).toBe(t.want);
|
|
|
|
expect(unescape(marked(t.markdown))).toBe(t.want);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
test("parse full width space", () => {
|
|
|
|
|
|
|
|
const tests = [
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
markdown: ` line1
|
|
|
|
|
|
|
|
line2`,
|
|
|
|
|
|
|
|
want: `<p> line1</p>
|
|
|
|
|
|
|
|
<p> line2</p>`,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
for (const t of tests) {
|
|
|
|
|
|
|
|
expect(unescape(marked(t.markdown))).toBe(t.want);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|