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

Fix documentation example in the book #31537

Merged
merged 1 commit into from
Feb 14, 2016
Merged

Conversation

ollie27
Copy link
Member

@ollie27 ollie27 commented Feb 10, 2016

The code sections shouldn't be inside a ```text block.

r? @steveklabnik

@steveklabnik
Copy link
Member

This is on purpose, actually. See the line right before: it's trying to show the literal syntax.

@ollie27
Copy link
Member Author

ollie27 commented Feb 10, 2016

But if you put

    ```text
    let x = 5;
    # let y = 6;
    # println!("{}", x + y);
    ```

It will result in the lines beginning with # being included which is what I thought this example was tying to avoid.

I guess if "our source code" is supposed to mean the source code of documentation.md then I think the text` lines inside this block need changing to rust`.

@steveklabnik
Copy link
Member

It will result in the lines beginning with # being included which is what I thought this example was tying to avoid.

This example is trying to show you how to use the #s. So in this part of it, they need to be shown.

@steveklabnik steveklabnik reopened this Feb 10, 2016
@steveklabnik
Copy link
Member

That said you are right that

I think the text lines inside this block need changing torust.

They should be. Would you mind updating this PR to change that?

The code sections shouldn't be inside a ```text block.
@ollie27
Copy link
Member Author

ollie27 commented Feb 10, 2016

Updated.

@steveklabnik
Copy link
Member

@bors: r+ rollup

Thanks for sticking with me :)

@bors
Copy link
Contributor

bors commented Feb 10, 2016

📌 Commit cff81d7 has been approved by steveklabnik

steveklabnik added a commit to steveklabnik/rust that referenced this pull request Feb 13, 2016
…abnik

The code sections shouldn't be inside a ```text block.

r? @steveklabnik
Manishearth added a commit to Manishearth/rust that referenced this pull request Feb 13, 2016
…abnik

The code sections shouldn't be inside a ```text block.

r? @steveklabnik
bors added a commit that referenced this pull request Feb 13, 2016
@bors bors merged commit cff81d7 into rust-lang:master Feb 14, 2016
@ollie27 ollie27 deleted the book_doc_example branch May 2, 2016 18:08
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