scribble
scribble copied to clipboard
Using @examples from scribble/example with #:lang can mess up indentation
Here is an example document that illustrates the issue:
#lang scribble/manual
@(require scribble/example)
@examples[#:lang racket
(require racket/gui/base
ffi/unsafe
ffi/unsafe/define)
(define cairo-lib
(ffi-lib #f))
(define-ffi-definer define-cairo
(ffi-lib #f))
(define-cairo cairo-create
(_fun _pointer -> _pointer)
#:c-id cairo_create)
]
If you produce HTML output from this, the indentation of the cairo-lib definition and the cairo-create definition are both off. The indented lines are shown with no indentation. Removing the #:lang racket argument restores the correct indentation behavior.
It's a strange workaround, but FWIW, I think moving the racket the next line also avoids the problem.