Apologies, I left in some debugging code. All we need is
@(define (markdown-inline file)
(xexprs->scribble-pres
(with-input-from-file file read-markdown)))
This will do you job, Jos Koot. For instance:
@title{Hello}
@(markdown-inline "new.md")
combined with (as "new.md")
This is a
*
>
> In that case, does it work if you simply remove the call to `decode-flow`
> from the definition of `markdown-inline`? Then the function would
> just return a list of pre-parts to be spliced into the enclosing document.
>
Doh. It appears to indeed!
> If you want to make the Markdown sections
On Sun, Sep 13, 2020 at 07:50:01AM -0400, Shriram Krishnamurthi wrote:
> It's useful to have this behave like a `#include`. There are settings where
> you want to have a non-Scribble person author things that go "in the
> middle"; you want to think of this as just a more convenient way of writing
Okay, if I understand correctly, you would expect the trailing text in my
example to be appended to the final subsection from the file.
In that case, does it work if you simply remove the call to `decode-flow`
from the definition of `markdown-inline`? Then the function would
just return a list of
It's useful to have this behave like a `#include`. There are settings where
you want to have a non-Scribble person author things that go "in the
middle"; you want to think of this as just a more convenient way of writing
what you'd have written in Scribble.
I realize there's presumably a closure
What should the splicing version do in the following case:
some text
@(markdown-inline "file-with-sections.md")
some trailing text
In particular, what should happen to the trailing text? Scribble doesn't
have a notion of returning to the top-level after a section. One
possibility would be
On Sat, Sep 12, 2020 at 06:14:53AM -0700, Shriram Krishnamurthi wrote:
> I need a little help with `decode` vs `decode-flow` in Scribble. (Also,
> this thread is about a question I wasn't able to find answered anywhere, so
> hopefully it will lead to a solution that others can also use.)
>
>
I need a little help with `decode` vs `decode-flow` in Scribble. (Also,
this thread is about a question I wasn't able to find answered anywhere, so
hopefully it will lead to a solution that others can also use.)
Sometimes it's really useful to incorporate Markdown-formatted content into
the
8 matches
Mail list logo