mirror of
git://git.code.sf.net/p/sbcl/sbcl
synced 2026-09-10 07:26:40 -04:00
sb-manual: fix indented code block parsing
... when the first line of the block looks like a list item.
This commit is contained in:
parent
c56f9b9d3c
commit
e45c5c70b5
|
|
@ -192,8 +192,8 @@
|
|||
* (defvar *my-string* (list 1 2 \"my string\"))
|
||||
*MY-STRING*
|
||||
|
||||
* (sb-ext:search-roots (sb-ext:make-weak-pointer (third *my-string*)))
|
||||
-> ((SIMPLE-VECTOR 3)) #x10004E9EAF[2] -> (SYMBOL) #x5044100F[1] -> (CONS) #x100181FAE7[1] -> (CONS) #x100181FAF7[1] -> (CONS) #x100181FB07[0] -> #x100181F9AF
|
||||
* (sb-ext:search-roots (sb-ext:make-weak-pointer (third *my-string*)))
|
||||
-> ((SIMPLE-VECTOR 3)) #x10004E9EAF[2] -> (SYMBOL) #x5044100F[1] -> (CONS) #x100181FAE7[1] -> (CONS) #x100181FAF7[1] -> (CONS) #x100181FB07[0] -> #x100181F9AF
|
||||
|
||||
The single line of output on *STANDARD-OUTPUT* shows the path from a
|
||||
root to `\"my string\"`: the path starts with SBCL's internal
|
||||
|
|
|
|||
|
|
@ -890,8 +890,8 @@
|
|||
(when n-lines-consumed
|
||||
(return-from parse-markdown-block (values n-lines-consumed result))))
|
||||
(cond
|
||||
((maybe-itemize-offset line)
|
||||
(collect-markdown-itemize lines index (maybe-itemize-offset line)))
|
||||
((and (indentation line) (>= (indentation line) (+ base-indent 4)))
|
||||
(collect-indented-code lines index base-indent))
|
||||
((maybe-itemize-offset line)
|
||||
(collect-markdown-itemize lines index (maybe-itemize-offset line)))
|
||||
(t nil))))
|
||||
|
|
|
|||
|
|
@ -590,15 +590,13 @@ Experimental: subject to change without prior notice.
|
|||
@end deffn
|
||||
An example of using this could look like this:
|
||||
|
||||
@itemize
|
||||
@item (defvar *my-string* (list 1 2 "my string"))
|
||||
@end itemize
|
||||
*MY-STRING*
|
||||
@example
|
||||
* (defvar *my-string* (list 1 2 "my string"))
|
||||
*MY-STRING*
|
||||
|
||||
@itemize
|
||||
@item (sb-ext:search-roots (sb-ext:make-weak-pointer (third *my-string*)))
|
||||
@end itemize
|
||||
-> ((@code{simple-vector} 3)) #x10004E9EAF[2] -> (@code{symbol}) #x5044100F[1] -> (@code{cons}) #x100181FAE7[1] -> (@code{cons}) #x100181FAF7[1] -> (@code{cons}) #x100181FB07[0] -> #x100181F9AF
|
||||
* (sb-ext:search-roots (sb-ext:make-weak-pointer (third *my-string*)))
|
||||
-> ((SIMPLE-VECTOR 3)) #x10004E9EAF[2] -> (SYMBOL) #x5044100F[1] -> (CONS) #x100181FAE7[1] -> (CONS) #x100181FAF7[1] -> (CONS) #x100181FB07[0] -> #x100181F9AF
|
||||
@end example
|
||||
|
||||
The single line of output on @code{*standard-output*} shows the path from a
|
||||
root to @code{"my string"}: the path starts with SBCL's internal
|
||||
|
|
@ -608,25 +606,25 @@ package system data structures followed by the symbol
|
|||
The @code{:print :verbose} argument produces similar behavior but
|
||||
describes the path elements in more detail:
|
||||
|
||||
@itemize
|
||||
@item (sb-ext:search-roots (sb-ext:make-weak-pointer (third *my-string*))
|
||||
:print :verbose)
|
||||
@end itemize
|
||||
Path to "my string":
|
||||
6 10004E9EAF [ 2] a (simple-vector 3)
|
||||
0 5044100F [ 1] COMMON-LISP-USER::*MY-STRING*
|
||||
0 100181FAE7 [ 1] a cons
|
||||
0 100181FAF7 [ 1] a cons
|
||||
0 100181FB07 [ 0] a cons
|
||||
@example
|
||||
* (sb-ext:search-roots (sb-ext:make-weak-pointer (third *my-string*))
|
||||
:print :verbose)
|
||||
Path to "my string":
|
||||
6 10004E9EAF [ 2] a (simple-vector 3)
|
||||
0 5044100F [ 1] COMMON-LISP-USER::*MY-STRING*
|
||||
0 100181FAE7 [ 1] a cons
|
||||
0 100181FAF7 [ 1] a cons
|
||||
0 100181FB07 [ 0] a cons
|
||||
@end example
|
||||
|
||||
The @code{:print nil} argument is a bit different:
|
||||
|
||||
@itemize
|
||||
@item (sb-ext:search-roots (sb-ext:make-weak-pointer (third *my-string*))
|
||||
:print nil)
|
||||
@end itemize
|
||||
(("my string" @code{:static} (#(*MY-STRING* 0 0) . 2) (*MY-STRING* . 1)
|
||||
((1 2 "my string") . 1) ((2 "my string") . 1) (("my string") . 0)))
|
||||
@example
|
||||
* (sb-ext:search-roots (sb-ext:make-weak-pointer (third *my-string*))
|
||||
:print nil)
|
||||
(("my string" :STATIC (#(*MY-STRING* 0 0) . 2) (*MY-STRING* . 1)
|
||||
((1 2 "my string") . 1) ((2 "my string") . 1) (("my string") . 0)))
|
||||
@end example
|
||||
|
||||
|
||||
There is no output on @code{*standard-output*}, and the return value is a
|
||||
|
|
|
|||
|
|
@ -944,11 +944,9 @@ Consider this definition of the factorial function:
|
|||
|
||||
This debugger session demonstrates the use of breakpoints:
|
||||
|
||||
@itemize
|
||||
@item (break) ; invoke debugger
|
||||
@end itemize
|
||||
|
||||
@example
|
||||
* (break) ; invoke debugger
|
||||
|
||||
debugger invoked on a SIMPLE-CONDITION in thread 11184: break
|
||||
|
||||
restarts (invokable by number or by possibly-abbreviated name):
|
||||
|
|
|
|||
Loading…
Reference in a new issue