Fix bug with pound signs used to mark sections.
Also update tests/scribble/markdown-docs files accordingly. original commit: faeba879e292414dd6d5d9e38d4a08b26e63cceb
This commit is contained in:
parent
624b8ef7e4
commit
77b1b267b5
|
@ -39,8 +39,9 @@
|
|||
|
||||
(define/override (render-part d ht)
|
||||
(let ([number (collected-info-number (part-collected-info d ht))])
|
||||
(printf (make-string (add1 (length number)) #\#))
|
||||
(printf " ")
|
||||
(unless (zero? (length number))
|
||||
(printf (make-string (length number) #\#))
|
||||
(printf " "))
|
||||
(for ([n (in-list (reverse number))] #:when n) (printf "~s." n))
|
||||
(when (part-title-content d)
|
||||
(when (ormap values number) (printf " "))
|
||||
|
|
|
@ -1,12 +1,22 @@
|
|||
# ```scheme
|
||||
(require racket/string)
|
||||
```
|
||||
# 1. Section
|
||||
|
||||
This is a top-level section.
|
||||
|
||||
## 1.1. Subsection
|
||||
|
||||
This is a subsection.
|
||||
|
||||
### 1.1.1. Subsubsection
|
||||
|
||||
This is a subsubsection.
|
||||
|
||||
Here is an itemize:
|
||||
|
||||
* Item 1.
|
||||
|
||||
* Item 2.
|
||||
|
||||
## 1. Section
|
||||
Here is a hyperlink:
|
||||
|
||||
[I am a hyperlink to Racket.](http://www.racket-lang.org/)
|
||||
|
||||
|
@ -16,12 +26,14 @@ _Italic_. \_Just underlines\_.
|
|||
|
||||
“Dobule quoted”. ‘Single quoted’.
|
||||
|
||||
Example of vebatim:
|
||||
|
||||
`Hi, world.`
|
||||
`A “quote”.`
|
||||
`Second line.`
|
||||
`Last line.`
|
||||
|
||||
The end.
|
||||
Another example of verbatim, with ticks/quotes:
|
||||
|
||||
`THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS`
|
||||
`“AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT`
|
||||
|
@ -35,6 +47,14 @@ The end.
|
|||
`(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE`
|
||||
`OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.`
|
||||
|
||||
Example of a defmodule:
|
||||
|
||||
```scheme
|
||||
(require racket/string)
|
||||
```
|
||||
|
||||
Example of a defproc:
|
||||
|
||||
```scheme
|
||||
(make-string k [char]) -> string?
|
||||
k : exact-nonnegative-integer?
|
||||
|
|
|
@ -3,14 +3,26 @@
|
|||
@(require scribble/manual
|
||||
(for-label racket/base racket/contract racket/string))
|
||||
|
||||
@defmodule[racket/string]
|
||||
@section{Section}
|
||||
|
||||
This is a top-level section.
|
||||
|
||||
@subsection{Subsection}
|
||||
|
||||
This is a subsection.
|
||||
|
||||
@subsubsection{Subsubsection}
|
||||
|
||||
This is a subsubsection.
|
||||
|
||||
Here is an itemize:
|
||||
|
||||
@itemize[
|
||||
@item{Item 1.}
|
||||
@item{Item 2.}
|
||||
]
|
||||
|
||||
@section{Section}
|
||||
Here is a hyperlink:
|
||||
|
||||
@hyperlink["http://www.racket-lang.org/" "I am a hyperlink to Racket."]
|
||||
|
||||
|
@ -23,6 +35,8 @@ _Just underlines_.
|
|||
``Dobule quoted''.
|
||||
`Single quoted'.
|
||||
|
||||
Example of vebatim:
|
||||
|
||||
@verbatim{
|
||||
Hi, world.
|
||||
A ``quote''.
|
||||
|
@ -30,7 +44,7 @@ Second line.
|
|||
Last line.
|
||||
}
|
||||
|
||||
The end.
|
||||
Another example of verbatim, with ticks/quotes:
|
||||
|
||||
@verbatim{
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
|
@ -46,6 +60,12 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
}
|
||||
|
||||
Example of a defmodule:
|
||||
|
||||
@defmodule[racket/string]
|
||||
|
||||
Example of a defproc:
|
||||
|
||||
@defproc[(make-string [k exact-nonnegative-integer?][char char? #\nul]) string?]{
|
||||
|
||||
Returns a new mutable string of length @racket[k] where each position in the
|
||||
|
|
Loading…
Reference in New Issue
Block a user