2

Is there a way to drop the need for ol and ul in jade lists - I want to write...

ol first item
li second item
li third item

seems like too much indenting otherwise

Currently, I am thinking I could make a filter that wraps each line with <li>|</li> and call the filter :ol so I can do...

:ol
  first line
  second line

Is there a better way?

Billy Moon
  • 57,113
  • 24
  • 136
  • 237

1 Answers1

2

Be very careful with the two points, at the beginning of a line, that Jade will interpret as another language (Stylus, markdown ... etc). The proper way to list the case is not so important.

ul
  li frist item
  li second item
ol
  li frist item number
  li second item number

This would translate into html so

<ul>
   <li>frist item</li>
   <li>second item</li>
</ul>
<ol>
   <li>frist item number</li>
   <li>second item number</li>
</ol>

really the most important thing is the tabulation to be generated either html

Louis
  • 146,715
  • 28
  • 274
  • 320