Problem with macro within another macro

Hello everyone.

I’m using the dropdown “callout” macro of @Mohammad to hide the code and examples of another macro inside a tiddler.

But I can’t get it to do it, the “callout” macro generates the bar with its arrow to display the content but inside I don’t see things the way I want.

The macro that I use within callout is: <<wikitext-example src:" "">> which is a variation of TW’s wikitext-example-without-html macro

The callout macro that surrounds it is as follows: <<callout-details type: example src:" " title:"Ejemplos" width:"100%" class:"">>

The complete code would be this:

<<callout-details type: example src:"""
<<wikitext-example src:"
<<alert-leftbar primary "primary alert" width:60%>>
<<alert-leftbar secondary "secondary alert" width:60%>>
<<alert-leftbar success "success alert" width:60%>>
<<alert-leftbar warning "warning alert" width:60%>>
<<alert-leftbar danger "danger alert" width:60%>>
<<alert-leftbar info "info alert" width:60%>>
<<alert-leftbar light "light alert" width:60%>>
<<alert-leftbar dark "dark alert" width:60%>>
">>""" title:"Ejemplos" width:"100%" class:"">>

I have tried surrounding the inner macro with triple double quots but it didn’t work.

Do you know if it is possible to make what I want work?

Thank you.

Please add links to the plugins you use, so we do not loose time because we need to search for them. Shiraz Callout 0.7.0 — admonitions static and collapsible

The callout-details needed 3 double-quotes and the wikitext-example would also need 3 double quotes, which is not possible. So you have a nesting problem with quotes here.


Try the following. – I did replace the double quotes with single quotes:
<<alert-leftbar primary 'primary alert' width:60%>>

<<callout-details type: example src:"""
<<wikitext-example src:"<<alert-leftbar primary 'primary alert' width:60%>>
<<alert-leftbar secondary 'secondary alert' width:60%>>
<<alert-leftbar success 'success alert' width:60%>>
<<alert-leftbar warning 'warning alert' width:60%>>
<<alert-leftbar danger 'danger alert' width:60%>>
<<alert-leftbar info 'info alert' width:60%>>
<<alert-leftbar light 'light alert' width:60%>>
<<alert-leftbar dark 'dark alert' width:60%>>
">>""" title:"Ejemplos" width:"100%" class:"">>
2 Likes

Hi @pmario.

You’re absolutely right, I didn’t realize that. When I asked the question I thought that just taking a look at the code would be enough. I didn’t think that if you wanted to test the code you wouldn’t be able to.

That sounds like it can’t be done the way I propose. :sob:

I guess the only easy way to do it will be to do a transclusion, right?

Thank you so much.

1 Like

Look at my example code. It works as expected

Thank you very much @pmario.

I didn’t see your code, but I just tested it and it works correctly.

I could swear that I tried that configuration and it didn’t work for me, I would probably skip some quotes.

Thank you very much again.