Skip to content

Conversation

jazzdelightsme
Copy link
Contributor

@jazzdelightsme jazzdelightsme commented Aug 15, 2017

fixes #298

@msftclas
Copy link

@jazzdelightsme,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot

@jazzdelightsme
Copy link
Contributor Author

I noticed that New-ExternalHelp does not actually wrap everything to the specified width, but I don't know if that's By Design or what.

Copy link
Collaborator

@vors vors left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vors
Copy link
Collaborator

vors commented Aug 23, 2017

The markdown renderer should not be actually used at all when we producing the txt files for about topics.

@jazzdelightsme
Copy link
Contributor Author

The markdown renderer should not be actually used at all when we producing the txt files for about topics.

You are correct. But I'm not passing $MaxAboutWidth to the markdown renderer... see line 861--I'm passing it to the TextRenderer constructor, and I have verified experimentally that it is used.

Steps:

  1. New-MarkdownAboutHelp -OutputFolder . -AboutName testThing
  2. Open .\about_testThing.md in an editor and add content to a bunch of lines, extending them out to 125 characters.
  3. New-ExternalHelp -MaxAboutWidth 90 -OutputPath . -Path .\about_testThing.md
  4. Open .\about_testThing.help.txt in an editor, and verify that certain lines got wrapped to be no longer than 90 characters.

This time I noticed that it's the "code" sections (marked by backticks) that do not get wrapped, which I think is reasonable.

@vors
Copy link
Collaborator

vors commented Sep 6, 2017

Oh I see. Cool, let's update the help for the platyPS itself and add this to the "Unreleased" section in the Changelog.md and it will be good to go.

@vors vors merged commit 862dffb into PowerShell:master Sep 6, 2017
@jazzdelightsme jazzdelightsme deleted the maxAboutWidth branch September 6, 2017 13:10
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.

Add a -MaxLineLength parameter for generating external "about" help
3 participants