Skip to content

Commit 54e5c71

Browse files
committed
fixed pre tags, to add linking
1 parent ffaf7dd commit 54e5c71

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

source/ch8_filehandling.ptx

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -451,9 +451,11 @@ public class CreateFile {
451451
Then if we run the program twice, the contents of <c>myfile.txt</c> would be:
452452
</p>
453453

454-
<pre>
454+
<listing xml:id="file-write-with-append-output">
455+
<program>
455456
File successfully updated!File successfully updated!
456-
</pre>
457+
</program>
458+
</listing>
457459

458460
<p>
459461
This doesn't look very good! If we want each additional write to appear on a new line? A simple solution is to use the <c>\n</c> newline character:
@@ -469,11 +471,14 @@ public class CreateFile {
469471
<p>
470472
Running the code with the newline character twice will result in the following contents in myfile.txt:
471473
</p>
472-
473-
<pre>
474+
475+
<listing xml:id="file-write-with-newline-output">
476+
<program>
474477
File successfully updated!
475478
File successfully updated!
476-
</pre>
479+
</program>
480+
</listing>
481+
477482
</section>
478483

479484
<section xml:id="file-delete">

0 commit comments

Comments
 (0)