visual-studio-codesettingsemmet

unwanted tag elements appears in emmet


this is vscode
p>lorem * 5 creates extra span tag elements and indeed if I would want span tags I could code it like that p>span>lorem * 5

in conclusion:

1- why p>lorem * 5 mimics as p>span>lorem*5
2- is there an emmet way to get the following html using emmet ?

<p> lorem sit amet bla bla... </p>
<p> Nam ut quasi animi inventore...</p>
<p> Maiores nisi expedita rem temporibus..</p>
<p> arum dolor! Laudantium obcaec..</p>
<p> magnam saepe deleniti ducimus, il..</p>

any relevant emmet settings in vscode ?
so I don't want span tags simply 5 paragraphs with lorem sentences. no span. possible ?


Solution

  • You are repeating lorem element 5 times so Emmet has to wrap it in implicit span element (for example, in ul>lorem*5 it will wrap it in <li> tag).

    What you trying to achieve is to repeat p element 5 times and insert lorem text in every element. E.g. your abbreviation should be p*5>lorem