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 pre-parts to be spliced into the enclosing document.

If you want to make the Markdown sections properly nest under the current
section, you would probably need to adjust the depths of all `part-start`
instances in the result. For example, if you use `markdown-inline` within a
subsection, you would probably want to increase the depth of all
part-starts by 2. I don't know if it's possible to find the current depth
automatically, so you might need to make it an extra argument to
`markdown-inline`.

I also would have expected calling `decode` and then extracting and
appending the blocks and parts to work, although it would have different
behavior wrt the trailing text. Your original message said that didn't
work, but how did it fail?

Ryan


On Sun, Sep 13, 2020 at 1:50 PM Shriram Krishnamurthi <shri...@gmail.com>
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
> what you'd have written in Scribble.
>
> I realize there's presumably a closure issue (`section` isn't going to
> come from the including file), and for that you probably want a different
> include form as well.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CANy33qm49ME9vVKLiYXSRGPgd8Xf0CHnzZpETyajtWrg48VGDw%40mail.gmail.com.

Reply via email to