Compare commits

...

1 Commits

Author SHA1 Message Date
0217ee703a use commonmark 2025-01-22 22:42:30 +01:00

View File

@ -21,7 +21,7 @@ func ConvertToMarkdown(c *Config, filename string) ([]byte, error) {
defer os.RemoveAll(tmpDir)
articleFileName := filepath.Join(os.TempDir(), fmt.Sprint(uuid.New(), ".md"))
cmd := exec.Command("pandoc", "-s", "-f", "docx", "-t", "commonmark_x", "-o", articleFileName, "--extract-media", tmpDir, filename) // TODO: Is writing to a file necessary?
cmd := exec.Command("pandoc", "-s", "-f", "docx", "-t", "commonmark", "-o", articleFileName, "--extract-media", tmpDir, filename) // TODO: Is writing to a file necessary?
cmd.Stderr = &stderr
if err = cmd.Run(); err != nil {
return nil, fmt.Errorf("error converting docx to markdown: %v: %v", err, stderr.String())