@@ -18,15 +18,15 @@ fn main() {}
18
18
19
19
assert_eq ! (
20
20
& result. unwrap( ) ,
21
- r#"<figure class="listing">
21
+ r## "<figure class="listing" id="listing-1-2 ">
22
22
<span class="file-name">Filename: src/main.rs</span>
23
23
24
24
````rust
25
25
fn main() {}
26
26
````
27
27
28
- <figcaption>Listing 1-2: A write-up which <em>might</em> include inline Markdown like <code>code</code> etc.</figcaption>
29
- </figure>"#
28
+ <figcaption><a href="#listing-1-2"> Listing 1-2</a> : A write-up which <em>might</em> include inline Markdown like <code>code</code> etc.</figcaption>
29
+ </figure>"##
30
30
) ;
31
31
}
32
32
@@ -80,16 +80,16 @@ fn get_a_box_of<T>(t: T) -> Box<T> {
80
80
81
81
assert_eq ! (
82
82
& result. unwrap( ) ,
83
- r#"<figure class="listing">
83
+ r## "<figure class="listing" id="listing-34-5 ">
84
84
85
85
````rust
86
86
fn get_a_box_of<T>(t: T) -> Box<T> {
87
87
Box::new(T)
88
88
}
89
89
````
90
90
91
- <figcaption>Listing 34-5: This has a <code>Box<T></code> in it.</figcaption>
92
- </figure>"#
91
+ <figcaption><a href="#listing-34-5"> Listing 34-5</a> : This has a <code>Box<T></code> in it.</figcaption>
92
+ </figure>"##
93
93
) ;
94
94
}
95
95
@@ -115,9 +115,9 @@ Save the file and go back to your terminal window"#,
115
115
assert ! ( result. is_ok( ) ) ;
116
116
assert_eq ! (
117
117
result. unwrap( ) ,
118
- r#"Now open the *main.rs* file you just created and enter the code in Listing 1-1.
118
+ r## "Now open the *main.rs* file you just created and enter the code in Listing 1-1.
119
119
120
- <figure class="listing">
120
+ <figure class="listing" id="listing-1-1" >
121
121
<span class="file-name">Filename: main.rs</span>
122
122
123
123
````rust
@@ -126,10 +126,10 @@ fn main() {
126
126
}
127
127
````
128
128
129
- <figcaption>Listing 1-1: A program that prints <code>Hello, world!</code></figcaption>
129
+ <figcaption><a href="#listing-1-1"> Listing 1-1</a> : A program that prints <code>Hello, world!</code></figcaption>
130
130
</figure>
131
131
132
- Save the file and go back to your terminal window"#
132
+ Save the file and go back to your terminal window"##
133
133
) ;
134
134
}
135
135
@@ -153,18 +153,18 @@ This is the closing."#,
153
153
assert ! ( result. is_ok( ) ) ;
154
154
assert_eq ! (
155
155
result. unwrap( ) ,
156
- r#"This is the opening.
156
+ r## "This is the opening.
157
157
158
- <figure class="listing">
158
+ <figure class="listing" id="listing-1-1" >
159
159
160
160
````rust
161
161
fn main() {}
162
162
````
163
163
164
- <figcaption>Listing 1-1: This is the caption</figcaption>
164
+ <figcaption><a href="#listing-1-1"> Listing 1-1</a> : This is the caption</figcaption>
165
165
</figure>
166
166
167
- This is the closing."#
167
+ This is the closing."##
168
168
) ;
169
169
}
170
170
0 commit comments