MarkdownSnippets
MarkdownSnippets copied to clipboard
Support for NuGet readme
I want to use MarkdownSnippets to generate a readme for GitHub and NuGet.
Currently I'm generating 1 file that is compatible with both. This means omitting the links as NuGet does not support html tags in the readme.
First issue. I would like a way to enforce "strict" markdown without any html output. The links could be rendered in markdown format instead of anchor tags, which would make them compatible with NuGet.
Second issue. It would be nice if I could generate 2 different readmes from the same source, but with different configs. I figure the easiest way to do this would be using the msbuild task, but there's currently an issue with nullable task parameters in msbuild dotnet/msbuild#4729
So, I'm wondering how to proceed. I'm happy to work on a PR.
Are the only 2 cases of links you want to be markdown the following?
<a id='snippet-MySnippetName'></a>
<sup><a href='/relativeUrlToFile#L1-L11' title='Snippet source file'>snippet source</a> | <a href='#snippet-MySnippetName' title='Start of snippet'>anchor</a></sup>
and what markdown would you use for those?
Yep, those are the cases I know of.
For pure markdown I'd remove the id tag, and change the link below the code to [snippet source](/relativeUrlToFile#L1-L11)