3

I tried this for couple of hours,but i cant find the solution, I'm using the rock candy for short code. And i tried to create listing

[list class="{class}"][li]{text}[/li][/list]

And html

<ul class="{class}"]<li>{text}</li>[/ul>

it's show only one list in output and if the list have more then once its not show and output like

[list class="bullet-1"][li]listing1[/li][li]listing2[/li][li]listing3[/li][/list]
3

Create two macros. Only then you can repeat [li][/li], otherwise it won't match with macro.

First


For <ul>

Macro:

[list class="{class}"]{content}[/list]

HTML:

<ul class="{class}">{content}</ul>

Second


And for <li>

Macro:

[li]{text}[/li]

HTML:

<li>{text}</li>

Output


Then you can do:

[list class="test"][li]test[/li][li]test2[/li][/list]

Output:

<ul class="test">
  <li>test</li>
  <li>test2</li>
</ul>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.