Skip to content

Latest commit

 

History

History
28 lines (23 loc) · 660 Bytes

README.md

File metadata and controls

28 lines (23 loc) · 660 Bytes

scribble-code-examples

A scribble examples form that works for non-s-expression languages

Documentation: https://docs.racket-lang.org/scribble-code-examples/index.html

This repository contains two packages:

  • scribble-code-examples-lib, contains the scribble-code-examples module but no docs or tests
  • scribble-code-examples, contains the documentation and tests
(require scribble-code-examples)

In a Scribble Documentation file, writing this:

@code-examples[#:lang "at-exp racket" #:context #'here]|{
(+ 1 2)
@+[1 3]
}|

Produces output that shows a Repl interaction like this:

> (+ 1 2)
3
> @+[1 3]
4