How to write jade template id as a variable

topic description

sources of topics and their own ideas

personal blog reading statistics when leancloud was introduced, most of the templates found in the tutorials used ejs, but the subject used jade. As they are not familiar with Jade, all have this doubt. Thank you for your help

related codes

/ / Please paste the code text below (do not replace the code with pictures)
how to convert ejs code to Jade code

<% if (theme.leancloud_visitors.enable) { %>
    <span id="<%- url_for(item.path) %>" class="leancloud_visitors" data-title="<%= item.title %>"></span>
<% } %>

what result do you expect? What is the error message actually seen?

rewrite into Jade code

Apr.09,2022

<% if (theme.leancloud_visitors.enable) { %>
    span-sharp<%- url_for(item.path) %>.leancloud_visitors(data-title="<%= item.title %>")
<% } %>

basic principles of Jade

span-sharp{id}.{class}()
Menu