scribble icon indicating copy to clipboard operation
scribble copied to clipboard

Using @examples from scribble/example with #:lang can mess up indentation

Open takikawa opened this issue 9 years ago • 1 comments

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.

takikawa avatar Jun 28 '16 21:06 takikawa

It's a strange workaround, but FWIW, I think moving the racket the next line also avoids the problem.

mflatt avatar Jun 29 '16 01:06 mflatt