html.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. function pug_escape(e) {
  2. var a = "" + e, t = pug_match_html.exec(a);
  3. if (!t) return e;
  4. var r, c, n, s = "";
  5. for (r = t.index, c = 0; r < a.length; r++) {
  6. switch (a.charCodeAt(r)) {
  7. case 34:
  8. n = "&quot;";
  9. break;
  10. case 38:
  11. n = "&amp;";
  12. break;
  13. case 60:
  14. n = "&lt;";
  15. break;
  16. case 62:
  17. n = "&gt;";
  18. break;
  19. default:
  20. continue;
  21. }
  22. c !== r && (s += a.substring(c, r)), c = r + 1, s += n;
  23. }
  24. return c !== r ? s + a.substring(c, r) : s;
  25. }
  26. var pug_match_html = /["&<>]/;
  27. function template(locals) {
  28. var pug_html = "", pug_mixins = {}, pug_interp;
  29. var version = 1449104952939;
  30. pug_html = pug_html + "<ul>\n<li>foo</li>\n<li>bar</li>\n<li>baz</li>\n</ul>\n<!--build:js /js/app.min.js?v=" + pug_escape(null == (pug_interp = version) ? "" : pug_interp) + "-->\n<!--endbuild--><p>You can <em>embed</em> html as well.</p><p><strong>Even</strong> as the body of a block expansion.</p>";
  31. return pug_html;
  32. }