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

Commit 334b28d

Browse files
committed
fix: add image fail and plain paragraph fail
Because of conlision of rId, and wrong way to deal with paragraph
1 parent 351a899 commit 334b28d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

md2docx/md2docx.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ private static void Main(string[] args)
113113
StyleDefinitionsPart styleDefinitionsPart1 = mainDocumentPart1.AddNewPart<StyleDefinitionsPart>("rId1");
114114
GenerateStyleDefinitionsPart1Content(styleDefinitionsPart1, (JArray)config["样式"]);
115115

116-
FontTablePart fontTablePart1 = mainDocumentPart1.AddNewPart<FontTablePart>("rId6");
116+
FontTablePart fontTablePart1 = mainDocumentPart1.AddNewPart<FontTablePart>("rId0");
117117
GeneratedCode.GenerateFontTablePartContent(fontTablePart1);
118118

119119
SetPackageProperties(document);
@@ -374,6 +374,7 @@ private static void CovertMarkdownBlock(MarkdownBlock block, ref Body docBody)
374374
};
375375
List<Paragraph> paragraphs = new List<Paragraph>();
376376
CovertMDInlines(new RunProperties(), mpara.Inlines, ref docPara, ref paragraphs);
377+
docBody.Append(docPara);
377378
foreach (Paragraph paragraph in paragraphs)
378379
{
379380
docBody.Append(paragraph);

0 commit comments

Comments
 (0)