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

Option to stitch multiple snippets together into a single test #76

Open
Vlad-Shcherbina opened this issue Mar 16, 2018 · 0 comments
Open

Comments

@Vlad-Shcherbina
Copy link

Some documentation styles intersperse code snippets with explanations.

Example

First, you need to define a function:

fn hw() {
    println!("hello world");
}

And then you call it:

fn main() {
    hw();
}

The second snippet won't compile without the first one, and it does not really make sense to put hw() definition in a template.

It would be nice if this could be expressed in the following way:

First, you need to define a function:


'''rust,sk-part-of-fn-tutorial
fn hw() {
    println!("hello world");
}
'''

And then you call it:

'''rust,sk-part-of-fn-tutorial
fn main() {
    hw();
}
'''

Vlad-Shcherbina added a commit to Vlad-Shcherbina/rust-skeptic that referenced this issue Mar 16, 2018
There should be no behavioral changes.

This refactoring is in preparation for budziq#76
Vlad-Shcherbina added a commit to Vlad-Shcherbina/rust-skeptic that referenced this issue Mar 16, 2018
Vlad-Shcherbina added a commit to Vlad-Shcherbina/rust-skeptic that referenced this issue Mar 16, 2018
There should be no behavioral changes.

This refactoring is in preparation for budziq#76
Vlad-Shcherbina added a commit to Vlad-Shcherbina/rust-skeptic that referenced this issue Mar 16, 2018
Vlad-Shcherbina added a commit to Vlad-Shcherbina/rust-skeptic that referenced this issue Mar 17, 2018
Vlad-Shcherbina added a commit to Vlad-Shcherbina/rust-skeptic that referenced this issue May 15, 2018
There should be no behavioral changes.

This refactoring is in preparation for budziq#76
Vlad-Shcherbina added a commit to Vlad-Shcherbina/rust-skeptic that referenced this issue May 15, 2018
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

1 participant