bkyk8rc3zvpnsf5inmcqq4n3k98cv6hj-my-site-hyper-literate-git.test.suzanne.soy-0.0.1

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 41c752b9b46be75cb840311a508fe894ba827be4
parent 7fb6f9e3f9ef2a2cb1d81573437efdb9d60b63ee
Author: Matthew Flatt <mflatt@racket-lang.org>
Date:   Thu, 24 May 2007 10:36:03 +0000

make scribble reader section fit narrower column

svn: r6265

original commit: 3c25a6ad93e78433981e798b920f9931e9d605c6

Diffstat:
Mcollects/scribblings/scribble/reader.scrbl | 6+++---
Mcollects/scribblings/scribble/utils.ss | 7++++++-
2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/collects/scribblings/scribble/reader.scrbl b/collects/scribblings/scribble/reader.scrbl @@ -307,7 +307,7 @@ the end of the text. They are therefore allowed, as long as they are balanced. @scribble-examples[ - "@foo{f{o}o}"] + "@foo{f{o}o}" ] There is also an alternative syntax for the body, one that specifies a @@ -492,8 +492,8 @@ the need for functions, for example: @verbatim[ #<<EOS > (define (important . text) @`b{@u{@big{@,@text}}}) - > (important @`p{This is an important announcement! + > (important @`p{An important announcement! Read it!}) - (b (u (big (p "This is an important announcement!" "\n" "Read it!")))) + (b (u (big (p "An important announcement!" "\n" "Read it!")))) EOS ] diff --git a/collects/scribblings/scribble/utils.ss b/collects/scribblings/scribble/utils.ss @@ -35,7 +35,12 @@ (map (lambda (line) (let ([line (if (string? line) (list (litchar/lines line) - (scheme:to-element (scribble:read (open-input-string line)))) + (scheme:to-paragraph + (let ([p (open-input-string line)]) + (port-count-lines! p) + (if (regexp-match? #rx"\n" line) + (scribble:read-syntax #f p) + (scribble:read p))))) line)]) (list (as-flow spacer) (as-flow (if line (car line) ""))