[Sugarcube] Blockquotes within Nested Linkreplace Macros

[Twine 2.3.2, Sugarcube 2.28.2]

I’m trying to format multiple paragraphs as blockquotes within nested linkreplace macros, using this code:

Testing <<linkreplace "blockquotes">>blockquotes:

<blockquote><<linkreplace "Test para 1">>Test para 1

Test para 2</blockquote>

The End<</linkreplace>><</linkreplace>>

The problem is, Twine fails to evaluate the closing blockquote tag, so I get this output (once I’ve clicked the links):

Testing blockquotes:

> Test para 1
> Test para 2</blockquote>
> The End

The result I want is this:

Testing blockquotes:

> Test para 1
> Test para 2

The End

I would appreciate any help. Thanks!

1 Like

The problem is that you’re starting the blockquote outside of the linkreplace and then ending it inside the linkreplace. That won’t work

The starting and ending points of any two-part element like that have to both be on the same level. What you want is more like this (indentations for clarity):

Testing <<linkreplace "blockquotes">>\
	<<linkreplace "Test para 1">>\
			Test para 1

			Test para 2\
		The End\

With it indented like that, you can easily see how both the “head” and the “tail” of the blockquote element are now on the same level. That’s why it’s highly recommended that you indent after a “head” and un-indent when you get to the “tail” when writing code. (The \ prevents a line break.)

Hope that helps! :slight_smile:

That makes sense. Thanks!