commit 250202ad87d0dda70417ef7b43dfd20b8f631fb3 parent 5e16b991fff6198121dae273a45005743a4e7ee6 Author: Matthew Flatt <mflatt@racket-lang.org> Date: Sat, 3 Aug 2013 12:18:03 -0600 scribble: fix list splicing for sections original commit: 570f51e942d3668727f7534c92e18837697d8e96 Diffstat:
3 files changed, 25 insertions(+), 3 deletions(-)
diff --git a/pkgs/scribble-pkgs/scribble-lib/scribble/decode.rkt b/pkgs/scribble-pkgs/scribble-lib/scribble/decode.rkt @@ -245,9 +245,13 @@ (part-to-collect part) para (cons s (part-parts part)))) - (if (splice? (car l)) - (loop (append (splice-run (car l)) (cdr l)) s-accum) - (loop (cdr l) (cons (car l) s-accum))))))] + (cond + [(splice? (car l)) + (loop (append (splice-run (car l)) (cdr l)) s-accum)] + [(list? (car l)) + (loop (append (car l) (cdr l)) s-accum)] + [else + (loop (cdr l) (cons (car l) s-accum))]))))] [(splice? (car l)) (loop (append (splice-run (car l)) (cdr l)) next? keys colls accum title tag-prefix tags vers style)] diff --git a/pkgs/scribble-pkgs/scribble-test/tests/scribble/docs/list-section.scrbl b/pkgs/scribble-pkgs/scribble-test/tests/scribble/docs/list-section.scrbl @@ -0,0 +1,9 @@ +#lang scribble/base + +@title{A} + +@section{B} + +@(list @subsection{C}) + +@(list @subsection{D}) diff --git a/pkgs/scribble-pkgs/scribble-test/tests/scribble/docs/list-section.txt b/pkgs/scribble-pkgs/scribble-test/tests/scribble/docs/list-section.txt @@ -0,0 +1,9 @@ +A + +1. B + +1.1. C + + +1.2. D +