Skip to content
This repository has been archived by the owner on May 21, 2022. It is now read-only.

Commit

Permalink
fix: add image fail and plain paragraph fail
Browse files Browse the repository at this point in the history
Because of conlision of rId, and wrong way to deal with paragraph
  • Loading branch information
CSUwangj committed Nov 23, 2019
1 parent 351a899 commit 334b28d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion md2docx/md2docx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ private static void Main(string[] args)
StyleDefinitionsPart styleDefinitionsPart1 = mainDocumentPart1.AddNewPart<StyleDefinitionsPart>("rId1");
GenerateStyleDefinitionsPart1Content(styleDefinitionsPart1, (JArray)config["样式"]);

FontTablePart fontTablePart1 = mainDocumentPart1.AddNewPart<FontTablePart>("rId6");
FontTablePart fontTablePart1 = mainDocumentPart1.AddNewPart<FontTablePart>("rId0");
GeneratedCode.GenerateFontTablePartContent(fontTablePart1);

SetPackageProperties(document);
Expand Down Expand Up @@ -374,6 +374,7 @@ private static void CovertMarkdownBlock(MarkdownBlock block, ref Body docBody)
};
List<Paragraph> paragraphs = new List<Paragraph>();
CovertMDInlines(new RunProperties(), mpara.Inlines, ref docPara, ref paragraphs);
docBody.Append(docPara);
foreach (Paragraph paragraph in paragraphs)
{
docBody.Append(paragraph);
Expand Down

0 comments on commit 334b28d

Please sign in to comment.