code: function filter(patterns) {
    if (typeof patterns === 'function') {
      return patterns;
    }
  
    return function(str) {
      var arr = ['\\[\\!\\[', '{%', '<%'].concat(patterns || []);
      var re = new RegExp(arr.join('|'));
      return !re.test(str);
    };
  }
docs: Default filter function for ignoring specified headings
  or heading patterns in the generated TOC. Ignore patterns
  may be passed on the options:
  
  ```js
  app.option('toc.ignore', ['foo', 'bar']);
  ```