Links in replacement text - how?

Biep
This doesn't work:
@title More replacement adventures.
Let me [try](@replace t=add a [link] to) to {label:t=replace} some text.

[link]:
Trying to get here!


Nor does this:
@title More replacement adventures.
Let me [try](@replace t={hoppa}) to {label:t=replace} some text.

[hoppa]:
add a [link] to

[link]:
Trying to get here!


In fact, both versions give output that looks severely broken.

So what is the correct way to do this?

Alex
Use a passage instead of trying to cram it all in one line:


@title More replacement adventures.
Let me [try](@replace t=replacement) to {label:t=replace} some text.

[replacement]:
add a [link] to

[link]:
Trying to get here!

Biep
And thanks again!

Actually, using a passage was exactly what I tried to do in my second attempt above, but I had tried [hoppa] and {hoppa}, but not simply hoppa.

Biep
But sometimes the cramming is necessary. For instance, this works:
Let me count: {label:n={sequence:one:two:three:four:[five]}}.

[five]:
@replace n=one, two, three, four, five
..and the list goes on.


But this doesn't:
Let me count: {label:n={number}}.

[number]:
{sequence:one:two:three:four:[five]}

[five]:
@replace n=one, two, three, four, five
..and the list goes on.


Not only does that introduce unwanted newlines, but it also leaves a spurious "five" on the screen. (That actually looks like a bug.)

One problem is that I have no good model in my head. Text at the right side hand of a replace command is clearly a different beast from text at the right side hand of a label, but how and why? I guess through trial and error I'll develop this model eventually. Sorry for bothering you meanwhile..

Biep
Any answer?

Alex
I don't understand the question?

This topic is now closed. Topics are closed after 180 days of inactivity.

Support

Forums