The handling of title numbering when converting Word to markdown

I need to convert Word to markdown, but if the numbering in the title is a list, it will cause two problems with the conversion.

  1. The question number is before the # mark
  2. Numbers 1.1 and 1.2 have both been changed to 1
    Is there a way to solve this problem, such as removing the list of titles and converting the content into a string before the title. Here is my code and files,

Document doc = new Document(“test.docx”);
doc.save(“test.md”);
test.zip (12.0 KB)

I want the final result to be # **1.a** ##*1.1.aa** ## *1.2.aaa**

@zhengkai
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): WORDSNET-27619

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

Hello, do you mean that we still need to wait for the new version update to make adjustments? The existing methods cannot solve my needs?such as what code methods can extract the content from the list.

@zhengkai Yes, the problem looks like a bug. We will keep you informed and let you know once it is resolved. Please accept our apologies for your inconvenience.

What is the exactly source of this?

@hienblake The issue is currently in the queue for analysis. Once the issue is resolved or we have additional information, we will be sure to let you know.

@zhengkai The issue has been closed as not a bug. Please try using the following code to get the expected output:

Document doc = new Document("in.docx");

// Specify plain text mode for lists.
MarkdownSaveOptions so = new MarkdownSaveOptions();
so.ListExportMode = MarkdownListExportMode.PlainText;

// Use specified option in Save() method.
doc.Save("aw.md", so);

The issues you have found earlier (filed as WORDSNET-27619) have been fixed in this Aspose.Words for Java 25.1 update.