This commit extends make-base-eval, make-base-eval-factory, and
make-eval-factory with an #:eval and input-program inputs so that
these functions are more like racket/sandbox make-evaluator.
These result from something like
@racket[(x y)]
being treated by Scribble as multiple RktXXX items rather than one. As
a result the Markdown emitted was:
`(``x`` ``y``)`
But obviously instead we want:
`(x y)`
Kludgosity alert: Although it would probably be more-correct to
consolidate the RktXXX items at the Scribble structure level, I don't
easily see how. `@racket` is baking in the concept of Racket
lexing (classifying text as various kinds of Racket elements). This is
handy when the render will be HTML or Latek, and is benignly N/A when
it will be plain text. But it's a bit square-peg/round-hole when the
render will be Markdown. Rather than attempt to "un-lex" the Scribble
structures (I'm having trouble seeing how), I'm handling it
"after-the-fact" -- adjusting the generated Markdown text.
If anyone thinks the preceding is an elaborate rationalization for an
ugly kludge, I wouldn't argue, but I would need some help
understanding the preferable way to go about it.
Unlike plain `racketblock`, `examples` and `interaction` are
"nested". As a result we emitted bad Markdown like:
```racket
Examples:
```racket
some-code
```
```
Markdown code blocks can't nest, so this needs to be:
```racket
Examples:
some-code
```
Also: Updated the unit test with examples of `examples` and
`interaction`.
A recent change improved "on this page" handling and also
fixed a short-circuit test to almost certainly do what
was originally intended, but the test was wrong, so just
get rid of it.
Related to PR 13305: I tried to use zero-width-space to force appropriate
line breaks, but unfortunately under Opera on Linux, this shows as
unsupported character glyphs.
Since I can't reliably use zero-width-space, I'm backtracking to the
prior solution on introducing spans with the mywbr class. However,
I've added in a   element to the content of the span, as suggested
elsewhere on the web. This appears to fix the _gcpointer issue that
Eric sees.
A part with style property 'toc-hidden no longer
hides child sections, which makes it consistent with Latex/PDF
rendering.
A part with style 'grouper and 'unnumbered does not make its
child parts render as more nested, which is consistent with
'gruper without 'unnumbered. An unnumbered grouper is represented
as "" in a section-number list (while #f is still used for
unnumbered non-grouper layers).
An extflonum is like a flonum, but with 80-bit precision and
not a number in the sense of `number?': only operations such as
`extfl+' work on extflonums, and only on platforms where extflonums
can be implemented by hardware without interefering with flonums
(i.e., on platforms where SSE instructions are used for
double-precision floats).
[Patch provided by Michael Filonenko and revised by Matthew.]
The compiler tracks information about bindings that are known to
hold extflonums, but the JIT does not yet exploit this information
to unbox them (except as intermediate results).
Had been specifying Scheme lexer for code blocks, while waiting for
new Racket lexer to wend its way from Pygments to Pygments.rb to
Linguist to GitHub.
That day is almost here: Linguist will soon update and deploy to
GitHub. And Racket 5.3.2 is about to release. As a result, I think
this is the correct time to switch to the Racket lexer: It should be
live on GitHub by the time people are using Racket 5.3.2.
/cc @rmculpepper -- I think this commit should go into the 5.3.2
release.
The `+m' flag is a long-overdue shorthand for `++xref-in setup/xref
load-collections-xref', which links to installed documentation in
the same way as DrRacket's "Scribble HTML" button.
That is, use `+m' to link to installed documentation,
scribble +m mine.scrbl
instead of the previously recommended
scribble ++xref-in setup/xref load-collections-xref mine.scrbl
Merge to 5.3.2
More precisely, do this for nested flows with the "refcontent" style.
For instance this Scribble:
@margin-note{Note: This is a note. Let's make it long enough that the
markdown output will have to line-wrap, to make sure the > mark starts
each line properly.}
Will render as this Markdown:
> Note: This is a note. Let's make it long enough that the markdown output
> will have to line-wrap, to make sure the > mark starts each line
> properly.
A site like GitHub.com will render this in a block-quote style
suitable for notes:
> Note: This is a note. Let's make it long enough that the markdown output
> will have to line-wrap, to make sure the > mark starts each line
> properly.
When a tag is serializable but not `write'--`read' invariant,
then it needs to be serialized and deserialized.
Also, clarify and check in `tag?' that a tag should be
serializable.
Render Scribble like
@hyperlink["url" "content"]
as Markdown like
[content](url)
Note that this only works for `@hyperlink`. The motivation is to
preserve content the author has explicitly written. (Previously,
`markdown-render.rkt` was discarding this; `text-render.rkt` still
does so.)
This does _not_ attempt to handle everything that `html-render.rkt`
would automatically generate and render as `<a>`. It simply can't --
things like hotlinked Racket keywords in code blocks simply won't work
in Markdown.