Skip to content

[book] Avoid scrollbars in code examples #2749

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

Merged
merged 1 commit into from
Jun 30, 2013

Conversation

wouterj
Copy link
Member

@wouterj wouterj commented Jun 21, 2013

Q A
Doc fix? yes
New docs? no
Applies to all
Fixed tickets -

There is one thing I'm not sure about and that thing are the wrapped commands:

$ php app/console generate:bundle AcmeFooBundle \
--dir src --format yaml

I don't know if it is commonly known that the \ character can be used for multiline commands

$ php app/console doctrine:generate:entity --entity="AcmeStoreBundle:Product" --fields="name:string(255) price:float description:text"
$ php app/console doctrine:generate:entity \
--entity="AcmeStoreBundle:Product" \
--fields="name:string(255) price:float description:text"
Copy link
Member

Choose a reason for hiding this comment

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

for me, I think the example would be more readable if further lines are indented like this:

$ php app/console doctrine:generate:entity \
  --entity="AcmeStoreBundle:Product" \
  --fields="name:string(255) price:float description:text"

weaverryan added a commit that referenced this pull request Jun 30, 2013
[book] Avoid scrollbars in code examples
@weaverryan weaverryan merged commit ae25cdb into symfony:2.2 Jun 30, 2013
weaverryan added a commit that referenced this pull request Jun 30, 2013
This is technically correct, and prevents the scrollbar online, but I don't want to confuse any users with these
@weaverryan
Copy link
Member

Hey Wouter!

Very nice! You're absolutely correct with your use of \ in the commands, but as I don't want to confuse any users, I reversed most of these at sha: dcf2c27

Thanks!

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.

3 participants