How could we alter this.
<${1:ul}> ${TM_SELECTED_TEXT/.+/ <li>$0</li>/g} </$1>
...to add a class option to the li tag, but only every other instance of the li tag? Thanks Sune for setting up this snippet, it saves me a ton of time when creating ul/ol lists!!!!
Adam Stacoviak Image202 Entertainment www.image202.com -- houston. 713.4291456 toronto. 416.9075496 fax. 713.4562013
On 12. Oct 2006, at 01:25, Adam Stacoviak wrote:
How could we alter this.
<${1:ul}> ${TM_SELECTED_TEXT/.+/ <li>$0</li>/g} </$1>
...to add a class option to the li tag, but only every other instance of the li tag? Thanks Sune for setting up this snippet, it saves me a ton of time when creating ul/ol lists!!!!
For the middle line, try something like:
${TM_SELECTED_TEXT/(.+)(?:\n(.+))?/ <li class="odd">$1</li>(?2:\n <li>$2</li>)/g}