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

Example names normalization #119

Closed
gerane opened this issue Jun 2, 2016 · 5 comments
Closed

Example names normalization #119

gerane opened this issue Jun 2, 2016 · 5 comments

Comments

@gerane
Copy link

gerane commented Jun 2, 2016

I am just getting started with the Module, and have noticed differences between the way my Markdown files are getting set.

One module has examples like this

### Example 1

and the other has them like this

### -------------------------- EXAMPLE 1 --------------------------

Is there a way to control this that I am overlooking?

@vors
Copy link
Collaborator

vors commented Jun 2, 2016

If there are no examples, we generate a placeholder in the form of ### Example 1.
Otherwise, we preserve the original title of the Example from the existing help.

I think we would need some way to normalize it (on-demand or as default behavior?).
Great point!

@vors vors added the question label Jun 3, 2016
@jongeller
Copy link
Contributor

I think the placeholder format is more readable in the Markdown. However I wonder if this would present cleanly in MAML. If it does look good, I would vote for new example header styles.

@vors vors changed the title Differences in Example Names Example names normalization Sep 7, 2017
@vors vors added enhancement and removed question labels Dec 4, 2017
@vors
Copy link
Collaborator

vors commented Dec 4, 2017

This issue been opened independently 3 times already, that really makes it the top request :)

@BernieWhite
Copy link
Contributor

@vors The current observed behaviour of comment based help is to pad 26 * dash(-) either side of the Example nn. For single/double digit examples this results in a line 63/64 characters long. With an the same number of dashes each side of the text.

Based on that we currently allow more text then just Example nn i.e. ### Example 1: Create help from a command I would suggest that we stick with the 63/64 character for the length of the line rounded down do that the number of dashes is the same either side of the text.

The other points is that comment based help capitalises the EXAMPLE NN words. For consistency with comment based help it makes sense to do the same. What do you think?

Based on discussion from other duplicate issue, the intent is only to implement a change that will affect MAML output, and markdown editing of examples would remain unchanged.

Happy to pick this one up.

@vors
Copy link
Collaborator

vors commented Dec 5, 2017

I think capitalization is not necessary, the dashes provides enough visual clue. We can revisit it later based on the feedback.

Yes, please, go ahead!

BernieWhite added a commit to BernieWhite/platyPS that referenced this issue Dec 8, 2017
@vors vors closed this as completed in #322 Dec 10, 2017
vors pushed a commit that referenced this issue Dec 10, 2017
* Updated maml generation to pad example header #119

* Updated change log

* Fix FoolLoop tests
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

4 participants