Skip to content
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

Fix unsafe characters in command names breaking markdown file creation #603

Closed
wants to merge 4 commits into from

Conversation

ShaunLawrie
Copy link

@ShaunLawrie ShaunLawrie commented Jun 18, 2023

PR Summary

This replaces unsafe characters in command names with underscores so that file creation will work if this library tries to create files for strangely named functions like:

  • gh?
  • git?

image

Note
The master branch currently has a failing test because it's checking for a single instance of a string in the output markdown which should be there twice, once in the synopsis and once in the description. It looks like it's been failing for a long time, I fixed it by making the description and the synopsis unique on line 349 of test/Pester/PlatyPs.Tests.ps1. This could be fixed in this PR or I can descope it https://ci.appveyor.com/project/PowerShell/markdown-maml/branch/master

PR Context

I've been trying to generate help docs for PowerShellAI and it uses question marks in command names which causes platyPS to fail when run on Windows.
Fixes #602

@ShaunLawrie
Copy link
Author

@microsoft-github-policy-service agree

@ShaunLawrie ShaunLawrie changed the title Fix unsafe characters in command names breaking markdown file creation on Windows Fix unsafe characters in command names breaking markdown file creation Jun 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unsafe characters in command names breaks markdown file creation on Windows
1 participant