-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple changes/adaptions #504
Open
echalone
wants to merge
7
commits into
PowerShell:master
Choose a base branch
from
echalone:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echalone
commented
Jan 25, 2021
•
edited
Loading
edited
- Sections, like for example Description, without data (and without example data due to new switch -SkipEmptyFields) will no longer be rendered
- Added switch -SinglePage to cmdlet New-MarkdownHelp so all functions will be written into the same module markdown file (same name as module landing page would normally have), instead of writing every cmdlet into its own markdown file
- Added switch -NoInputOutputFormatting to cmdlets New-MarkdownHelp, Update-MarkdownHelp and Merge-MarkdownHelp so Input/Output comments won't be formatted. This is because microsoft gives us no way to actually set the values in Input/Output correct (type, description) in a PS function header, but will put everything written there into the "type" property, so all text will be formatted bold. So for this to work correctly (not as intended) this switch needs to be provided so everything in the Input/Output section will just be written as is, without any bold formatting.
- Added switch -SkipEmptyFields to cmdlets New-MarkdownHelp, Update-MarkdownHelp and Update-MarkdownHelpModule which will omit example text for empty fields which were not provided/found and will instead just skip empty sections
- Added switch -CreateTableOfContent to cmdlet New-MarkdownHelp which will create an additional table of content in the single- or module-landing-page.
- Added switch -WithModuleMetaData to cmdlet New-MarkdownHelp which will add a section "Module Metadata" filled with the following data (as far as that data exists): Module version, Author, Company, Copyright, Tags, License Uri, Project Uri
- Added module version to yaml metadata at beginning of markdown
- Fixed rendering of example Introduction (is array but wasn't handled as array) and removed "PS>", "PS >" (PS Core default) and "PS C:>" (PS 5 default) from Introduction array (apparently microsoft is putting everything before a > sign in an example into introduction, even its default values, so we had to delete those default values from the array for the documentation to be generated as was previously, so without a "PS >" or "PS C:>" being suddenly in the introduction of every example).
- Adapted UnitTests to work with removed empty sections (due to missing data)
* Sections, like for example Description, without data (and without example data due to new switch -SkipEmptyFields) will no longer be rendered * Added switch -SinglePage to cmdlet New-MarkdownHelp so all functions will be written into the same module markdown file (same name as module landing page would normally have), instead of writing every cmdlet into its own markdown file * Added switch -NoInputOutputFormatting to cmdlets New-MarkdownHelp, Update-MarkdownHelp and Merge-MarkdownHelp so Input/Output comments won't be formatted. This is because microsoft gives us no way to actually set the values in Input/Output correct (type, description) but will put everything written there into the "type" property, so all text will be formatted bold. So for this to work correctly (not as intended) this switch needs to be provided so everything in the Input/Output section will just be written as is, without any bold formatting. * Added switch -SkipEmptyFields to cmdlets New-MarkdownHelp, Update-MarkdownHelp and Update-MarkdownHelpModule which will omit example text for empty fields which were not provided/found and will instead just skip empty sections * Added switch -CreateTableOfContent to cmdlet New-MarkdownHelp which will create an additional table of content in the single- or module-landing-page. * Added switch -WithModuleMetaData to cmdlet New-MarkdownHelp which will add a section "Module Metadata" filled with the following data (as far as that data exists): Module version, Author, Company, Copyright, Tags, License Uri, Project Uri * Added module version to yaml metadata at beginning of markdown * Adapted UnitTests to work with removed empty sections (due to missing data)
Okay, seems one UnitTest is failing, I might have to take another look at that tomorrow |
…andom error in the build, so we gotta restart it)
Alright, seems everything is fixed now :) |
Added help for new switches
Fixed a bug with new Switch -WithModuleMetaData and added help text for all the new switches in the documentation |
Fixed metadata output bugs (on github everything appeared as one line in the metadata, some more linebreaks were needed for the headers as well) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.