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:
Tom Moor
2020-10-21 08:53:59 -07:00
committed by GitHub
parent b78e2f1e05
commit df7b9f3e88
9 changed files with 394 additions and 3 deletions

View File

@ -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";