style tweaks for Guide addition

This commit is contained in:
Matthew Flatt 2020-10-01 11:18:02 -06:00
parent 0e66734ea6
commit 932bce5e04

View File

@ -410,25 +410,21 @@ instead of the original byte stream.
(interaction-eval #:eval port-eval (require racket/port racket/string)))
For these examples, say you have two files in the same directory as
your program.
@filepath{oneline.txt} contains
your program, @filepath{oneline.txt} and @filepath{manylines.txt}.
@filebox["oneline.txt"]{
@verbatim[#:indent 1]{
I am one line, but there is an empty line after this one.
}
and
@filepath{manylines.txt} contains
}}
@filebox["manylines.txt"]{
@verbatim[#:indent 1]{
I am
a message
split over a few lines.
}
}}
If you have a file that is quite small, you can get
away with reading in the file as a string:
@ -466,9 +462,9 @@ any extraneous whitespace at the very beginning and very end of our file.
(Lots of formatters out there insist that text files end with a single
blank line).
See also: @racket[read-line] if your file has one line of text.
See also @racket[read-line] if your file has one line of text.
If instead you want to process individual lines of a file, then you can
If, instead, you want to process individual lines of a file, then you can
use @racket[for] with @racket[in-lines]:
@interaction[