feat: Add support for "word" files exported from Confluence (#1600)
* Display error message to end user * fix: Improve conversion of tables * fix: Characters at ends of lines in tables lost
This commit is contained in:
@ -56,6 +56,25 @@ describe("documentImporter", () => {
|
||||
expect(response.title).toEqual("Heading 1");
|
||||
});
|
||||
|
||||
it("should convert Confluence Word output to markdown", async () => {
|
||||
const user = await buildUser();
|
||||
const name = "confluence.doc";
|
||||
const file = new File({
|
||||
name,
|
||||
type: "application/msword",
|
||||
path: path.resolve(__dirname, "..", "test", "fixtures", name),
|
||||
});
|
||||
|
||||
const response = await documentImporter({
|
||||
user,
|
||||
file,
|
||||
ip,
|
||||
});
|
||||
|
||||
expect(response.text).toContain("this is a test document");
|
||||
expect(response.title).toEqual("Heading 1");
|
||||
});
|
||||
|
||||
it("should load markdown", async () => {
|
||||
const user = await buildUser();
|
||||
const name = "markdown.md";
|
||||
|
Reference in New Issue
Block a user