apparently some people think parentheses are ugly
This commit is contained in:
parent
ea76ac4296
commit
4c01d8cd8c
1
info.rkt
1
info.rkt
|
@ -12,6 +12,7 @@
|
||||||
"unstable-lib"
|
"unstable-lib"
|
||||||
"fancy-app"
|
"fancy-app"
|
||||||
"alexis-util"
|
"alexis-util"
|
||||||
|
"sweet-exp"
|
||||||
"scribble-lib"))
|
"scribble-lib"))
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
#lang racket/base
|
#lang sweet-exp racket/base
|
||||||
|
|
||||||
(provide scribble-include/no-subsection)
|
provide scribble-include/no-subsection
|
||||||
|
|
||||||
|
require syntax/parse/define
|
||||||
|
racket/match
|
||||||
|
scribble/core
|
||||||
|
for-syntax racket/base
|
||||||
|
syntax/parse
|
||||||
|
|
||||||
(require syntax/parse/define
|
|
||||||
racket/match
|
|
||||||
scribble/core
|
|
||||||
(for-syntax racket/base
|
|
||||||
syntax/parse
|
|
||||||
))
|
|
||||||
|
|
||||||
;; scribble-include/no-subsection requires that the module to be included:
|
;; scribble-include/no-subsection requires that the module to be included:
|
||||||
;; - has no title
|
;; - has no title
|
||||||
|
@ -15,16 +15,20 @@
|
||||||
;; - has exactly one (list 'part (generated-tag)) tag
|
;; - has exactly one (list 'part (generated-tag)) tag
|
||||||
;; - has no subsections
|
;; - has no subsections
|
||||||
;; - has no `to-collect` content
|
;; - has no `to-collect` content
|
||||||
(define-syntax scribble-include/no-subsection
|
define-syntax scribble-include/no-subsection
|
||||||
(syntax-parser
|
syntax-parser
|
||||||
[(~and stx (scribble-include/no-subsection mod))
|
(~and stx (scribble-include/no-subsection mod))
|
||||||
#:with doc-from-mod (datum->syntax #'mod 'doc)
|
#:with doc-from-mod
|
||||||
(unless (module-path? (syntax->datum #'mod))
|
datum->syntax #'mod 'doc
|
||||||
(raise-syntax-error #f
|
unless (module-path? (syntax->datum #'mod))
|
||||||
"not a module path"
|
raise-syntax-error #f
|
||||||
#'stx
|
"not a module path"
|
||||||
#'mod))
|
#'stx
|
||||||
#'(begin
|
#'mod
|
||||||
(require (only-in mod [doc-from-mod doc]))
|
syntax
|
||||||
(match-define (part #f (list (list 'part (generated-tag))) #f style '() blocks '()) doc)
|
begin
|
||||||
(nested-flow style blocks))]))
|
require (only-in mod [doc-from-mod doc])
|
||||||
|
match-define
|
||||||
|
part #f (list (list 'part (generated-tag))) #f style '() blocks '()
|
||||||
|
doc
|
||||||
|
nested-flow style blocks
|
||||||
|
|
Loading…
Reference in New Issue
Block a user