jade过滤器

以上语法基本讲完了jade的语法,然后在jade里面并不仅仅局限于使用jade语法,同样可以使用其他的插件语言,这种机制在jade里面称为filter,在jade里面加入过滤器用冒号

 

markdown
:markdown
  hi,this is **jade** [link](http://imooc.com)
=>
<p>hi,this is <strong>jade</strong> <a href="http://imooc.com">link</a></p>

 

less
style
  :less
    body{
      p{
        color:#ccc
      }
     }
=>
<style>body p {
color: #cccccc;
}
</style>

 

coffee-script
script
  :coffee
    console.log 'this is coffee'
=>
<script>(function() {
console.log('this is coffee');
}).call(this);
</script>

 

 

posted @ 2018-07-12 11:02  wzndkj  阅读(226)  评论(0编辑  收藏  举报