Doraku / DefaultDocumentation

Create a simple markdown documentation from the Visual Studio xml one.
MIT No Attribution
159 stars 26 forks source link

Improve lists(sub-lists, term) #91

Closed IdkGoodName closed 2 years ago

IdkGoodName commented 3 years ago

Adds support for <term> tag and allows the creation of sub-lists. Em-dash() is used to separate the term and the description. If either of them is not present, em dash is not added.


<list type="number">
    <item>
        <term>A</term>
        <description>B</description>
    </item>
    <list type="bullet">
        <item><term>C</term></item>
        <item><description>D</description></item>
    </list>
    <item>E</item>
</list>

Outputs:

1. A — B
   - C
   - D
2. E
  1. A — B
    • C
    • D
  2. E
Doraku commented 3 years ago

there seems to be some conflicts, but thanks for pointing that the nested list display was not working as intended because of the Descendants instead of Elements call in the extensions! There was no need for specific code in the ListElement class as the recursion handling is automatic through the AppendAsMarkdown method (it just needed to initialize correctly the GetElementWriters of the tester and put the nested <list> inside the <item>). Still interested in the <term>!

IdkGoodName commented 3 years ago

I could remove the sub-list implementation and just leave out the term then

IdkGoodName commented 2 years ago

Should I even update this PR?

Doraku commented 2 years ago

Yes fell free to do it, I am done with the big refactoring and just need to add xml comments to the Api library before the next version so there shouldn't be any big conflicts from now on.

IdkGoodName commented 2 years ago

Sorry for basically stretching this out for a month.

Doraku commented 2 years ago

oh no it's me who kept making big changes with all kind of conflicts haha

IdkGoodName commented 2 years ago

Is it ready for merge or what does need to be changed?

Doraku commented 2 years ago

not sure why there's some conflict, I will try to merge it manually (sorry wasn't really available in the past weeks).

Doraku commented 2 years ago

Finally got around to merge it. I hope it's ok for you after rereading the microsoft documentation for list I changed a little the implementation for table (listheader should only contains terms and item only descriptions).