On Friday, 23 June 2017 at 06:59:22 UTC, Suliman wrote:
I need to get external variable and make class by it's value

- string mystr = "lng-" ~ language;
- foreach(i, line; arrayOfLines )
        li
                code.mystr #{line}

I need to get HTML code like this:

<li>
<code class="lng-d">some D code</code>
</li>

But class name become "mystr" and I am getting:

<li>
<code class="mystr">some D code</code>
</li>

How to fix it?
You can use the html syntax for the class parameter, the funny/nice thing is, that mystr can be used directly without "#{}" around.

code(class=mystr) #{line}

works.

Reply via email to