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 94fa0a30d2e2fb65a685f557a59200386738832d
parent 6d992d7a2f068a9823930c90631267eb5268e77e
Author: Laurent Orseau <laurent.orseau@gmail.com>
Date:   Tue, 29 Oct 2013 09:00:35 +0100

Scribble->Markdown titles are now rendered correctly. Sections have been shifted by one level (which also looks better on Github).

Markdown: fix defmodule to avoid printing the package in the example

fix markdown example file to make test pass

original commit: fc3321481ce9928eaeea393302a0c0f187937271

Diffstat:
Mpkgs/scribble-pkgs/scribble-lib/scribble/markdown-render.rkt | 4+---
Mpkgs/scribble-pkgs/scribble-test/tests/scribble/markdown-docs/example.md | 8+++++---
Mpkgs/scribble-pkgs/scribble-test/tests/scribble/markdown-docs/example.scrbl | 4+++-
3 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/pkgs/scribble-pkgs/scribble-lib/scribble/markdown-render.rkt b/pkgs/scribble-pkgs/scribble-lib/scribble/markdown-render.rkt @@ -44,9 +44,7 @@ (define/override (render-part d ht) (let ([number (collected-info-number (part-collected-info d ht))]) (unless (part-style? d 'hidden) - (unless (zero? (number-depth number)) - (printf (make-string (number-depth number) #\#)) - (printf " ")) + (printf (string-append (make-string (add1 (number-depth number)) #\#) " ")) (let ([s (format-number number '())]) (unless (null? s) (printf "~a.~a" diff --git a/pkgs/scribble-pkgs/scribble-test/tests/scribble/markdown-docs/example.md b/pkgs/scribble-pkgs/scribble-test/tests/scribble/markdown-docs/example.md @@ -1,12 +1,14 @@ -# 1. Section +# Title + +## 1. Section This is a top-level section. -## 1.1. Subsection +### 1.1. Subsection This is a subsection. -### 1.1.1. Subsubsection +#### 1.1.1. Subsubsection This is a subsubsection. diff --git a/pkgs/scribble-pkgs/scribble-test/tests/scribble/markdown-docs/example.scrbl b/pkgs/scribble-pkgs/scribble-test/tests/scribble/markdown-docs/example.scrbl @@ -5,6 +5,8 @@ @(define my-eval (make-base-eval)) @(my-eval '(require racket/base)) +@title{Title} + @section{Section} This is a top-level section. @@ -66,7 +68,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Example of a defmodule: -@defmodule[racket/string] +@defmodule[racket/string #:packages ()] Example of a defproc: