Skip to content

Instantly share code, notes, and snippets.

@chimanaco
Last active December 27, 2016 04:55
Show Gist options
  • Save chimanaco/b1ceb5077ebb1611ba780a0d2203d625 to your computer and use it in GitHub Desktop.
Save chimanaco/b1ceb5077ebb1611ba780a0d2203d625 to your computer and use it in GitHub Desktop.
Pug Copy & Paste
ul#list
- len = data.list.length
- for(var i = 0; i < len; i++)
li(class='list ' + ' list-' + data.list[i].category data-groups='["' + data.list[i].category + '"]')
a(href='' + data.list[i].id + '/')
img.thumbImg(src='/common/movie_s/mobile/' + data.list[i].id + '/thumb.jpg')
p !{data.list[i].title} [!{data.list[i].location}]
// print data object
p !{JSON.stringify(data)}
// script
script.
console.log('script');
// replace with reqular expression
p !{data.text.replace(/\n/g, '<br>')}
// include raw html
body
| <div><a href="lala"> blabla </a></div>
p hihuhohoo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment