Skip to content

Conversation

BernieWhite
Copy link
Contributor

Fix #119

@BernieWhite
Copy link
Contributor Author

@vors Full loop tests on Add-Member fail, which is expected based on help for Add-Member doesn't include dashed example titles.

Didn't want to change the test, because it is correct. What do you think?


private bool ShouldBreak(SectionFormatOption formatOption)
{
// If the line break flag is set return true.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nit fix :)

_cmdletUpdated = true;
}

// Update the parameter with the merged in FormatOption
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nit fix :)

@vors
Copy link
Collaborator

vors commented Dec 9, 2017

Didn't want to change the test, because it is correct. What do you think?

I think we need green build before we can merge it :)

Let's just change the test to stripe out the padding on example header comparison.

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.

Awesome, just 1 comment. Since we are auto-adding padding in maml now, we should stripe it of in the Update-MarkdownHelp and New-MarkdownHelp. Beware, this can be a little tricky. I think the update scenario may not use the maml model reflection at all, but we should include stripping it out, because there is a lot of existing platyPS markdown help that inconsistently uses it. The new-markdownhelp definitely uses the reflection model and we should stipe it out there too.

@BernieWhite
Copy link
Contributor Author

@vors Yes, actually I see why we would need to update the tests anyway. Otherwise every commit after until Add-Member help is updated would fail.

Good idea. I'll add tests for that and we'll see how it goes.

So just confirming that I've understood correctly. In the New-MarkdownHelp and Update-MarkdownHelp scenarios if a dash padded header has been used we'll simplify example titles in markdown to remove the dashes.

@vors
Copy link
Collaborator

vors commented Dec 9, 2017

Correct.

The update-markdown scenario is fine, because we simply take the markdown part as is:

// All examples come only from strtringModel
result.Examples.AddRange(stringModel.Examples);

@vors vors merged commit f4543c5 into PowerShell:master Dec 10, 2017
@vors
Copy link
Collaborator

vors commented Dec 10, 2017

👏 :shipit:

@BernieWhite BernieWhite deleted the bewhite/example-names-normalization-119 branch December 12, 2017 07:57
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.

2 participants