Nested iA-Writer content blocks

sven.jaspers.97's Avatar

sven.jaspers.97

04 Nov, 2020 06:40 PM

Hi,
I recently purchased Marked2, to be used with iA-writer. I use the content-block feature in iA quite often and was relieved to see Marked supports this. However, I've ran into a problem. While Marked handles a single file with multiple content blocks referencing images and other markdown files just fine, a problem rises when the included files also include content-blocks. It appears only the first iteration of content blocks is processed. Using the <<[...] syntax, files can be included recursively. However, because I sometimes write on an iPad and have to able to use iA's included preview, I can't use this syntax natively.
I tried writing a simple preprocessor, replacing iA's content block syntax with Marked's, but this preprocessor also works exclusively on the first file rendered, not the referenced files.

Is there any way to make markdown process nested content blocks, without having to resort to manually writing the <<[...] syntax in iA-writer?

For clarification, I want to have a single markdown file, referencing multiple chapter markdown files, which in turn reference multiple subfiles, containing the actual text and images

  1. Support Staff 1 Posted by Brett on 04 Nov, 2020 07:42 PM

    Brett's Avatar

    I'm afraid support for iA blocks is fairly rudimentary. The way they're
    currently processed does not allow for nesting. The preprocessor will
    also fail because it's not run recursively, either. For now, the only
    option is to use Marked's include syntax, which is the only one that's
    fully developed.

    It's possible I'll expand the iA blocks to handle nesting in the future.
    It's not a use case I've considered (or had requested) previously.

    -Brett

  2. 2 Posted by sven.jaspers.97 on 04 Nov, 2020 08:16 PM

    sven.jaspers.97's Avatar

    Thanks for your response! I hope one day you will be able to implement recursive preprocessors or expanded iA blocks, but for now I will change my workflow to include the Marked syntax.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac