Extend CMakeModule to parse markdown #35
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
According to the discussion in https://gitlab.kitware.com/cmake/cmake/-/issues/24934#note_1367903, I am not sure if the intent is to migrate cmake upstream to import this module, so probably I will open an equivalent MR there. But for now I need some help with designing this:
#[===[.md:
as a valid module directiveMaybe this also requires to switch between a
rst
andmyst
renderer accordingly. Didn't see an example that selects appropriate renderersRender only top-most documentation as the module documentation. Other internal sections, e.g. for. This would rather need a re-design to usefunction()
should be separate. Maybe they should be innode.children
? This is to make it more like python docs format or doxygenauto-api
similar tomatlab
/python
.The goal is to be able to render a file like this:
my_module.cmake
Currently it doesn't handle nested documentations, i.e. they are all merged together. Example