@@ -18,15 +18,15 @@ fn main() {}
1818
1919 assert_eq ! (
2020 & result. unwrap( ) ,
21- r#"<figure class="listing">
21+ r## "<figure class="listing" id="listing-1-2 ">
2222<span class="file-name">Filename: src/main.rs</span>
2323
2424````rust
2525fn main() {}
2626````
2727
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>"##
3030 ) ;
3131}
3232
@@ -80,16 +80,16 @@ fn get_a_box_of<T>(t: T) -> Box<T> {
8080
8181 assert_eq ! (
8282 & result. unwrap( ) ,
83- r#"<figure class="listing">
83+ r## "<figure class="listing" id="listing-34-5 ">
8484
8585````rust
8686fn get_a_box_of<T>(t: T) -> Box<T> {
8787 Box::new(T)
8888}
8989````
9090
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>"##
9393 ) ;
9494}
9595
@@ -115,9 +115,9 @@ Save the file and go back to your terminal window"#,
115115 assert ! ( result. is_ok( ) ) ;
116116 assert_eq ! (
117117 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.
119119
120- <figure class="listing">
120+ <figure class="listing" id="listing-1-1" >
121121<span class="file-name">Filename: main.rs</span>
122122
123123````rust
@@ -126,10 +126,10 @@ fn main() {
126126}
127127````
128128
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>
130130</figure>
131131
132- Save the file and go back to your terminal window"#
132+ Save the file and go back to your terminal window"##
133133 ) ;
134134}
135135
@@ -153,18 +153,18 @@ This is the closing."#,
153153 assert ! ( result. is_ok( ) ) ;
154154 assert_eq ! (
155155 result. unwrap( ) ,
156- r#"This is the opening.
156+ r## "This is the opening.
157157
158- <figure class="listing">
158+ <figure class="listing" id="listing-1-1" >
159159
160160````rust
161161fn main() {}
162162````
163163
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>
165165</figure>
166166
167- This is the closing."#
167+ This is the closing."##
168168 ) ;
169169}
170170
0 commit comments