Skip to content

Commit

Permalink
scribble/html-properties: add html-addition
Browse files Browse the repository at this point in the history
  • Loading branch information
mflatt committed Nov 6, 2020
1 parent 8f21a9a commit 7c7e121
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
9 changes: 9 additions & 0 deletions scribble-doc/scribblings/scribble/core.scrbl
Original file line number Diff line number Diff line change
Expand Up @@ -1851,6 +1851,15 @@ For a @racket[part] that corresponds to an HTML page, adds content to
the @tt{<head>} tag.}


@defstruct[head-addition ([xexpr xexpr/c])]{

Like @racket[head-extra] in content, but propagated to enclosing and
nested HTML pages like @racket[css-addition]. Additions to @tt{<head>}
via @racket[head-addition] appear before additions via @racket[head-extra].

@history[#:added "1.38"]}


@defstruct[render-convertible-as ([types (listof (or/c 'png-bytes 'svg-bytes 'gif-bytes))])]{
For a @racket[part] that corresponds to an HTML page,
controls how objects that subscribe to the @racketmodname[file/convertible]
Expand Down
2 changes: 1 addition & 1 deletion scribble-lib/info.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@

(define pkg-authors '(mflatt eli))

(define version "1.37")
(define version "1.38")
1 change: 1 addition & 0 deletions scribble-lib/scribble/html-properties.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@
[link-resource ([path path-string?])]

[head-extra ([xexpr xexpr/c])]
[head-addition ([xexpr xexpr/c])]
[render-convertible-as ([types (listof (or/c 'png-bytes 'svg-bytes 'gif-bytes))])])
1 change: 1 addition & 0 deletions scribble-lib/scribble/html-render.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -894,6 +894,7 @@
(extract js-style-addition? js-style-addition-path)
(reverse extra-script-files)))
,(xml:comment "[if IE 6]><style type=\"text/css\">.SIEHidden { overflow: hidden; }</style><![endif]")
,@(extract head-addition? head-addition-xexpr)
,@(for/list ([p (style-properties (part-style d))]
#:when (head-extra? p))
(head-extra-xexpr p)))
Expand Down

0 comments on commit 7c7e121

Please sign in to comment.