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

Update-MarkdownHelp adds and removes blank lines #319

Closed
BernieWhite opened this issue Nov 17, 2017 · 1 comment
Closed

Update-MarkdownHelp adds and removes blank lines #319

BernieWhite opened this issue Nov 17, 2017 · 1 comment

Comments

@BernieWhite
Copy link
Contributor

Steps to reproduce

  • In an existing cmdlet markdown document add a blank line between ## DESCRIPTION and first line of the description text. e.g.
## DESCRIPTION

Create markdown from an input object.

## EXAMPLES
  • With no defined related links, create a single blank directly after the ## RELATED LINKS section.
## NOTES

## RELATED LINKS

Expected behavior

  • A single blank line created after section headers such as description should be preserved for readability.
  • Multiple sequential blank lines after section headers should be removed/reduced down to one.
  • Blank line should not be added to after section header if it didn't exist before Update-MarkdownHelp was called.
  • No more then a single blank line should be created after the related links section with no related links have been defined.

Actual behavior

  • Blank line is removed.

image

## DESCRIPTION
Create markdown from an input object.

## EXAMPLES
  • Blank line is added.

image

## NOTES

# RELATED LINKS


Environment data

v0.8.3

@vors
Copy link
Collaborator

vors commented Nov 20, 2017

Yeah, it would be great to preserve blanks. I fixed a countless number of bugs with blank lines and as far as Update-MarkdownHelp is noop second time, I'm pretty happy. Feel free to poke around in this codepath.

BernieWhite added a commit to BernieWhite/platyPS that referenced this issue Nov 24, 2017
BernieWhite added a commit to BernieWhite/platyPS that referenced this issue Dec 4, 2017
@vors vors closed this as completed in #321 Dec 8, 2017
vors pushed a commit that referenced this issue Dec 8, 2017
* Updates to preserve blank line after header #319

* Updates to preserve blank line after header for examples and parameters

* Updates to preserve parameter, input, output and to remove trailing line breaks related links

* Avoid adding 2 extra lines after parameter body
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

No branches or pull requests

2 participants