Hello World!
some content
and some more
Repository: pugjs/pug Branch: master Commit: c323ed3e630b Files: 912 Total size: 2.7 MB Directory structure: gitextract_f46w__89/ ├── .editorconfig ├── .gitattributes ├── .github/ │ ├── FUNDING.yml │ ├── ISSUE_TEMPLATE.md │ └── workflows/ │ ├── rollingversions.yml │ └── test.yml ├── .gitignore ├── .prettierrc.js ├── README.md ├── SECURITY.md ├── package.json ├── packages/ │ ├── pug/ │ │ ├── History.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── examples/ │ │ │ ├── README.md │ │ │ ├── attributes.js │ │ │ ├── attributes.pug │ │ │ ├── code.js │ │ │ ├── code.pug │ │ │ ├── dynamicscript.js │ │ │ ├── dynamicscript.pug │ │ │ ├── each.js │ │ │ ├── each.pug │ │ │ ├── extend-layout.pug │ │ │ ├── extend.js │ │ │ ├── extend.pug │ │ │ ├── form.js │ │ │ ├── form.pug │ │ │ ├── includes/ │ │ │ │ ├── foot.pug │ │ │ │ ├── head.pug │ │ │ │ ├── scripts.pug │ │ │ │ └── style.css │ │ │ ├── includes.js │ │ │ ├── includes.pug │ │ │ ├── layout-debug.js │ │ │ ├── layout.js │ │ │ ├── layout.pug │ │ │ ├── mixins/ │ │ │ │ ├── dialog.pug │ │ │ │ └── profile.pug │ │ │ ├── mixins.js │ │ │ ├── mixins.pug │ │ │ ├── pet.pug │ │ │ ├── rss.js │ │ │ ├── rss.pug │ │ │ ├── text.js │ │ │ ├── text.pug │ │ │ ├── whitespace.js │ │ │ └── whitespace.pug │ │ ├── lib/ │ │ │ └── index.js │ │ ├── package.json │ │ ├── register.js │ │ ├── support/ │ │ │ └── benchmark.js │ │ └── test/ │ │ ├── README.md │ │ ├── __snapshots__/ │ │ │ └── pug.test.js.snap │ │ ├── anti-cases/ │ │ │ ├── attrs.unescaped.pug │ │ │ ├── case-when.pug │ │ │ ├── case-without-with.pug │ │ │ ├── else-condition.pug │ │ │ ├── else-without-if.pug │ │ │ ├── inlining-a-mixin-after-a-tag.pug │ │ │ ├── key-char-ending-badly.pug │ │ │ ├── key-ending-badly.pug │ │ │ ├── mismatched-inline-tag.pug │ │ │ ├── mixin-args-syntax-error.pug │ │ │ ├── mixins-blocks-with-bodies.pug │ │ │ ├── multiple-non-nested-tags-on-a-line.pug │ │ │ ├── non-existant-filter.pug │ │ │ ├── non-mixin-block.pug │ │ │ ├── open-brace-in-attributes.pug │ │ │ ├── readme.md │ │ │ ├── self-closing-tag-with-block.pug │ │ │ ├── self-closing-tag-with-body.pug │ │ │ ├── self-closing-tag-with-code.pug │ │ │ ├── tabs-and-spaces.pug │ │ │ ├── unclosed-interpolated-call.pug │ │ │ ├── unclosed-interpolated-tag.pug │ │ │ └── unclosed-interpolation.pug │ │ ├── browser/ │ │ │ ├── index.html │ │ │ └── index.pug │ │ ├── cases/ │ │ │ ├── attrs-data.html │ │ │ ├── attrs-data.pug │ │ │ ├── attrs.colon.html │ │ │ ├── attrs.colon.pug │ │ │ ├── attrs.html │ │ │ ├── attrs.js.html │ │ │ ├── attrs.js.pug │ │ │ ├── attrs.pug │ │ │ ├── attrs.unescaped.html │ │ │ ├── attrs.unescaped.pug │ │ │ ├── auxiliary/ │ │ │ │ ├── 1794-extends.pug │ │ │ │ ├── 1794-include.pug │ │ │ │ ├── blocks-in-blocks-layout.pug │ │ │ │ ├── dialog.pug │ │ │ │ ├── empty-block.pug │ │ │ │ ├── escapes.html │ │ │ │ ├── extends-empty-block-1.pug │ │ │ │ ├── extends-empty-block-2.pug │ │ │ │ ├── extends-from-root.pug │ │ │ │ ├── extends-relative.pug │ │ │ │ ├── filter-in-include.pug │ │ │ │ ├── includable.js │ │ │ │ ├── include-from-root.pug │ │ │ │ ├── inheritance.extend.mixin.block.pug │ │ │ │ ├── inheritance.extend.recursive-grand-grandparent.pug │ │ │ │ ├── inheritance.extend.recursive-grandparent.pug │ │ │ │ ├── inheritance.extend.recursive-parent.pug │ │ │ │ ├── layout.include.pug │ │ │ │ ├── layout.pug │ │ │ │ ├── mixin-at-end-of-file.pug │ │ │ │ ├── mixins.pug │ │ │ │ ├── pet.pug │ │ │ │ ├── smile.html │ │ │ │ ├── window.pug │ │ │ │ └── yield-nested.pug │ │ │ ├── basic.html │ │ │ ├── basic.pug │ │ │ ├── blanks.html │ │ │ ├── blanks.pug │ │ │ ├── block-code.html │ │ │ ├── block-code.pug │ │ │ ├── block-expansion.html │ │ │ ├── block-expansion.pug │ │ │ ├── block-expansion.shorthands.html │ │ │ ├── block-expansion.shorthands.pug │ │ │ ├── blockquote.html │ │ │ ├── blockquote.pug │ │ │ ├── blocks-in-blocks.html │ │ │ ├── blocks-in-blocks.pug │ │ │ ├── blocks-in-if.html │ │ │ ├── blocks-in-if.pug │ │ │ ├── case-blocks.html │ │ │ ├── case-blocks.pug │ │ │ ├── case.html │ │ │ ├── case.pug │ │ │ ├── classes-empty.html │ │ │ ├── classes-empty.pug │ │ │ ├── classes.html │ │ │ ├── classes.pug │ │ │ ├── code.conditionals.html │ │ │ ├── code.conditionals.pug │ │ │ ├── code.escape.html │ │ │ ├── code.escape.pug │ │ │ ├── code.html │ │ │ ├── code.iteration.html │ │ │ ├── code.iteration.pug │ │ │ ├── code.pug │ │ │ ├── comments-in-case.html │ │ │ ├── comments-in-case.pug │ │ │ ├── comments.html │ │ │ ├── comments.pug │ │ │ ├── comments.source.html │ │ │ ├── comments.source.pug │ │ │ ├── doctype.custom.html │ │ │ ├── doctype.custom.pug │ │ │ ├── doctype.default.html │ │ │ ├── doctype.default.pug │ │ │ ├── doctype.keyword.html │ │ │ ├── doctype.keyword.pug │ │ │ ├── each.else.html │ │ │ ├── each.else.pug │ │ │ ├── escape-chars.html │ │ │ ├── escape-chars.pug │ │ │ ├── escape-test.html │ │ │ ├── escape-test.pug │ │ │ ├── escaping-class-attribute.html │ │ │ ├── escaping-class-attribute.pug │ │ │ ├── filter-in-include.html │ │ │ ├── filter-in-include.pug │ │ │ ├── filters-empty.html │ │ │ ├── filters-empty.pug │ │ │ ├── filters.coffeescript.html │ │ │ ├── filters.coffeescript.pug │ │ │ ├── filters.custom.html │ │ │ ├── filters.custom.pug │ │ │ ├── filters.include.custom.html │ │ │ ├── filters.include.custom.pug │ │ │ ├── filters.include.html │ │ │ ├── filters.include.pug │ │ │ ├── filters.inline.html │ │ │ ├── filters.inline.pug │ │ │ ├── filters.less.html │ │ │ ├── filters.less.pug │ │ │ ├── filters.markdown.html │ │ │ ├── filters.markdown.pug │ │ │ ├── filters.nested.html │ │ │ ├── filters.nested.pug │ │ │ ├── filters.stylus.html │ │ │ ├── filters.stylus.pug │ │ │ ├── html.html │ │ │ ├── html.pug │ │ │ ├── html5.html │ │ │ ├── html5.pug │ │ │ ├── include-extends-from-root.html │ │ │ ├── include-extends-from-root.pug │ │ │ ├── include-extends-of-common-template.html │ │ │ ├── include-extends-of-common-template.pug │ │ │ ├── include-extends-relative.html │ │ │ ├── include-extends-relative.pug │ │ │ ├── include-filter-coffee.coffee │ │ │ ├── include-only-text-body.html │ │ │ ├── include-only-text-body.pug │ │ │ ├── include-only-text.html │ │ │ ├── include-only-text.pug │ │ │ ├── include-with-text-head.html │ │ │ ├── include-with-text-head.pug │ │ │ ├── include-with-text.html │ │ │ ├── include-with-text.pug │ │ │ ├── include.script.html │ │ │ ├── include.script.pug │ │ │ ├── include.yield.nested.html │ │ │ ├── include.yield.nested.pug │ │ │ ├── includes-with-ext-js.html │ │ │ ├── includes-with-ext-js.pug │ │ │ ├── includes.html │ │ │ ├── includes.pug │ │ │ ├── inheritance.alert-dialog.html │ │ │ ├── inheritance.alert-dialog.pug │ │ │ ├── inheritance.defaults.html │ │ │ ├── inheritance.defaults.pug │ │ │ ├── inheritance.extend.html │ │ │ ├── inheritance.extend.include.html │ │ │ ├── inheritance.extend.include.pug │ │ │ ├── inheritance.extend.mixins.block.html │ │ │ ├── inheritance.extend.mixins.block.pug │ │ │ ├── inheritance.extend.mixins.html │ │ │ ├── inheritance.extend.mixins.pug │ │ │ ├── inheritance.extend.pug │ │ │ ├── inheritance.extend.recursive.html │ │ │ ├── inheritance.extend.recursive.pug │ │ │ ├── inheritance.extend.whitespace.html │ │ │ ├── inheritance.extend.whitespace.pug │ │ │ ├── inheritance.html │ │ │ ├── inheritance.pug │ │ │ ├── inline-tag.html │ │ │ ├── inline-tag.pug │ │ │ ├── intepolated-elements.html │ │ │ ├── intepolated-elements.pug │ │ │ ├── interpolated-mixin.html │ │ │ ├── interpolated-mixin.pug │ │ │ ├── interpolation.escape.html │ │ │ ├── interpolation.escape.pug │ │ │ ├── javascript-new-lines.js │ │ │ ├── layout.append.html │ │ │ ├── layout.append.pug │ │ │ ├── layout.append.without-block.html │ │ │ ├── layout.append.without-block.pug │ │ │ ├── layout.multi.append.prepend.block.html │ │ │ ├── layout.multi.append.prepend.block.pug │ │ │ ├── layout.prepend.html │ │ │ ├── layout.prepend.pug │ │ │ ├── layout.prepend.without-block.html │ │ │ ├── layout.prepend.without-block.pug │ │ │ ├── mixin-at-end-of-file.html │ │ │ ├── mixin-at-end-of-file.pug │ │ │ ├── mixin-block-with-space.html │ │ │ ├── mixin-block-with-space.pug │ │ │ ├── mixin-hoist.html │ │ │ ├── mixin-hoist.pug │ │ │ ├── mixin-via-include.html │ │ │ ├── mixin-via-include.pug │ │ │ ├── mixin.attrs.html │ │ │ ├── mixin.attrs.pug │ │ │ ├── mixin.block-tag-behaviour.html │ │ │ ├── mixin.block-tag-behaviour.pug │ │ │ ├── mixin.blocks.html │ │ │ ├── mixin.blocks.pug │ │ │ ├── mixin.merge.html │ │ │ ├── mixin.merge.pug │ │ │ ├── mixins-unused.html │ │ │ ├── mixins-unused.pug │ │ │ ├── mixins.html │ │ │ ├── mixins.pug │ │ │ ├── mixins.rest-args.html │ │ │ ├── mixins.rest-args.pug │ │ │ ├── namespaces.html │ │ │ ├── namespaces.pug │ │ │ ├── nesting.html │ │ │ ├── nesting.pug │ │ │ ├── pipeless-comments.html │ │ │ ├── pipeless-comments.pug │ │ │ ├── pipeless-filters.html │ │ │ ├── pipeless-filters.pug │ │ │ ├── pipeless-tag.html │ │ │ ├── pipeless-tag.pug │ │ │ ├── pre.html │ │ │ ├── pre.pug │ │ │ ├── quotes.html │ │ │ ├── quotes.pug │ │ │ ├── regression.1794.html │ │ │ ├── regression.1794.pug │ │ │ ├── regression.784.html │ │ │ ├── regression.784.pug │ │ │ ├── script.whitespace.html │ │ │ ├── script.whitespace.pug │ │ │ ├── scripts.html │ │ │ ├── scripts.non-js.html │ │ │ ├── scripts.non-js.pug │ │ │ ├── scripts.pug │ │ │ ├── self-closing-html.html │ │ │ ├── self-closing-html.pug │ │ │ ├── single-period.html │ │ │ ├── single-period.pug │ │ │ ├── some-included.styl │ │ │ ├── some.md │ │ │ ├── some.styl │ │ │ ├── source.html │ │ │ ├── source.pug │ │ │ ├── styles.html │ │ │ ├── styles.pug │ │ │ ├── tag.interpolation.html │ │ │ ├── tag.interpolation.pug │ │ │ ├── tags.self-closing.html │ │ │ ├── tags.self-closing.pug │ │ │ ├── template.html │ │ │ ├── template.pug │ │ │ ├── text-block.html │ │ │ ├── text-block.pug │ │ │ ├── text.html │ │ │ ├── text.pug │ │ │ ├── utf8bom.html │ │ │ ├── utf8bom.pug │ │ │ ├── vars.html │ │ │ ├── vars.pug │ │ │ ├── while.html │ │ │ ├── while.pug │ │ │ ├── xml.html │ │ │ ├── xml.pug │ │ │ ├── yield-before-conditional-head.html │ │ │ ├── yield-before-conditional-head.pug │ │ │ ├── yield-before-conditional.html │ │ │ ├── yield-before-conditional.pug │ │ │ ├── yield-head.html │ │ │ ├── yield-head.pug │ │ │ ├── yield-title-head.html │ │ │ ├── yield-title-head.pug │ │ │ ├── yield-title.html │ │ │ ├── yield-title.pug │ │ │ ├── yield.html │ │ │ └── yield.pug │ │ ├── cases-es2015/ │ │ │ ├── attr.html │ │ │ └── attr.pug │ │ ├── dependencies/ │ │ │ ├── dependency1.pug │ │ │ ├── dependency2.pug │ │ │ ├── dependency3.pug │ │ │ ├── extends1.pug │ │ │ ├── extends2.pug │ │ │ ├── include1.pug │ │ │ └── include2.pug │ │ ├── duplicate-block/ │ │ │ ├── __snapshots__/ │ │ │ │ └── index.test.js.snap │ │ │ ├── index.pug │ │ │ ├── index.test.js │ │ │ └── layout-with-duplicate-block.pug │ │ ├── eachOf/ │ │ │ ├── __snapshots__/ │ │ │ │ └── index.test.js.snap │ │ │ ├── error/ │ │ │ │ ├── left-side.pug │ │ │ │ ├── no-brackets.pug │ │ │ │ ├── one-val.pug │ │ │ │ └── right-side.pug │ │ │ ├── index.test.js │ │ │ └── passing/ │ │ │ ├── brackets.pug │ │ │ └── no-brackets.pug │ │ ├── error.reporting.test.js │ │ ├── examples.test.js │ │ ├── extends-not-top-level/ │ │ │ ├── default.pug │ │ │ ├── duplicate.pug │ │ │ ├── index.pug │ │ │ └── index.test.js │ │ ├── fixtures/ │ │ │ ├── append/ │ │ │ │ ├── app-layout.pug │ │ │ │ ├── layout.pug │ │ │ │ ├── page.html │ │ │ │ └── page.pug │ │ │ ├── append-without-block/ │ │ │ │ ├── app-layout.pug │ │ │ │ ├── layout.pug │ │ │ │ └── page.pug │ │ │ ├── compile.with.include.locals.error.pug │ │ │ ├── compile.with.include.syntax.error.pug │ │ │ ├── compile.with.layout.locals.error.pug │ │ │ ├── compile.with.layout.syntax.error.pug │ │ │ ├── compile.with.layout.with.include.locals.error.pug │ │ │ ├── compile.with.layout.with.include.syntax.error.pug │ │ │ ├── element-with-multiple-attributes.pug │ │ │ ├── include.locals.error.pug │ │ │ ├── include.syntax.error.pug │ │ │ ├── invalid-block-in-extends.pug │ │ │ ├── issue-1593/ │ │ │ │ ├── include-layout.pug │ │ │ │ ├── include.pug │ │ │ │ ├── index.pug │ │ │ │ └── layout.pug │ │ │ ├── layout.locals.error.pug │ │ │ ├── layout.pug │ │ │ ├── layout.syntax.error.pug │ │ │ ├── layout.with.runtime.error.pug │ │ │ ├── mixin-include.pug │ │ │ ├── mixin.error.pug │ │ │ ├── multi-append-prepend-block/ │ │ │ │ ├── redefine.pug │ │ │ │ └── root.pug │ │ │ ├── perf.pug │ │ │ ├── prepend/ │ │ │ │ ├── app-layout.pug │ │ │ │ ├── layout.pug │ │ │ │ ├── page.html │ │ │ │ └── page.pug │ │ │ ├── prepend-without-block/ │ │ │ │ ├── app-layout.pug │ │ │ │ ├── layout.pug │ │ │ │ ├── page.html │ │ │ │ └── page.pug │ │ │ ├── runtime.error.pug │ │ │ ├── runtime.layout.error.pug │ │ │ ├── runtime.with.mixin.error.pug │ │ │ └── scripts.pug │ │ ├── markdown-it/ │ │ │ ├── comment.md │ │ │ ├── index.test.js │ │ │ ├── layout-markdown-include.pug │ │ │ └── layout-markdown-inline.pug │ │ ├── plugins.test.js │ │ ├── pug.test.js │ │ ├── regression-2436/ │ │ │ ├── __snapshots__/ │ │ │ │ └── index.test.js.snap │ │ │ ├── index.test.js │ │ │ ├── issue1.pug │ │ │ ├── issue2.pug │ │ │ ├── layout.pug │ │ │ ├── other1.pug │ │ │ ├── other2.pug │ │ │ └── other_layout.pug │ │ ├── run-es2015.test.js │ │ ├── run-syntax-errors.test.js │ │ ├── run-utils.js │ │ ├── run.test.js │ │ └── shadowed-block/ │ │ ├── __snapshots__/ │ │ │ └── index.test.js.snap │ │ ├── base.pug │ │ ├── index.pug │ │ ├── index.test.js │ │ └── layout.pug │ ├── pug-attrs/ │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.js │ │ ├── package.json │ │ └── test/ │ │ └── index.test.js │ ├── pug-code-gen/ │ │ ├── HISTORY.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.js │ │ └── package.json │ ├── pug-error/ │ │ ├── LICENSE │ │ ├── README.md │ │ ├── package.json │ │ ├── src/ │ │ │ └── index.ts │ │ ├── test/ │ │ │ └── index.test.js │ │ └── tsconfig.json │ ├── pug-filters/ │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.js │ │ ├── lib/ │ │ │ ├── handle-filters.js │ │ │ └── run-filter.js │ │ ├── package.json │ │ └── test/ │ │ ├── __snapshots__/ │ │ │ ├── filter-aliases.test.js.snap │ │ │ ├── index.test.js.snap │ │ │ └── per-filter-options-applied-to-nested-filters.test.js.snap │ │ ├── cases/ │ │ │ ├── filters-empty.input.json │ │ │ ├── filters.cdata.input.json │ │ │ ├── filters.coffeescript.input.json │ │ │ ├── filters.custom.input.json │ │ │ ├── filters.include.custom.input.json │ │ │ ├── filters.include.custom.pug │ │ │ ├── filters.include.input.json │ │ │ ├── filters.inline.input.json │ │ │ ├── filters.less.input.json │ │ │ ├── filters.markdown.input.json │ │ │ ├── filters.nested.input.json │ │ │ ├── filters.stylus.input.json │ │ │ ├── include-filter-coffee.coffee │ │ │ └── some.md │ │ ├── custom-filters.js │ │ ├── errors/ │ │ │ └── dynamic-option.input.json │ │ ├── errors-src/ │ │ │ └── dynamic-option.jade │ │ ├── filter-aliases.test.js │ │ ├── index.test.js │ │ └── per-filter-options-applied-to-nested-filters.test.js │ ├── pug-lexer/ │ │ ├── History.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.d.ts │ │ ├── index.js │ │ ├── package.json │ │ └── test/ │ │ ├── __snapshots__/ │ │ │ └── index.test.js.snap │ │ ├── cases/ │ │ │ ├── attr-es2015.pug │ │ │ ├── attrs-data.pug │ │ │ ├── attrs.js.pug │ │ │ ├── attrs.pug │ │ │ ├── attrs.unescaped.pug │ │ │ ├── basic.pug │ │ │ ├── blanks.pug │ │ │ ├── block-code.pug │ │ │ ├── block-expansion.pug │ │ │ ├── block-expansion.shorthands.pug │ │ │ ├── blockquote.pug │ │ │ ├── blocks-in-blocks.pug │ │ │ ├── blocks-in-if.pug │ │ │ ├── case-blocks.pug │ │ │ ├── case.pug │ │ │ ├── classes-empty.pug │ │ │ ├── classes.pug │ │ │ ├── code.conditionals.pug │ │ │ ├── code.escape.pug │ │ │ ├── code.iteration.pug │ │ │ ├── code.pug │ │ │ ├── comments-in-case.pug │ │ │ ├── comments.pug │ │ │ ├── comments.source.pug │ │ │ ├── doctype.custom.pug │ │ │ ├── doctype.default.pug │ │ │ ├── doctype.keyword.pug │ │ │ ├── each.else.pug │ │ │ ├── escape-chars.pug │ │ │ ├── escape-test.pug │ │ │ ├── escaping-class-attribute.pug │ │ │ ├── filter-in-include.pug │ │ │ ├── filters-empty.pug │ │ │ ├── filters.coffeescript.pug │ │ │ ├── filters.custom.pug │ │ │ ├── filters.include.custom.pug │ │ │ ├── filters.include.pug │ │ │ ├── filters.inline.pug │ │ │ ├── filters.less.pug │ │ │ ├── filters.markdown.pug │ │ │ ├── filters.nested.pug │ │ │ ├── filters.stylus.pug │ │ │ ├── filters.verbatim.pug │ │ │ ├── html.pug │ │ │ ├── html5.pug │ │ │ ├── include-extends-from-root.pug │ │ │ ├── include-extends-of-common-template.pug │ │ │ ├── include-extends-relative.pug │ │ │ ├── include-only-text-body.pug │ │ │ ├── include-only-text.pug │ │ │ ├── include-with-text-head.pug │ │ │ ├── include-with-text.pug │ │ │ ├── include.script.pug │ │ │ ├── include.yield.nested.pug │ │ │ ├── includes-with-ext-js.pug │ │ │ ├── includes.pug │ │ │ ├── inheritance.alert-dialog.pug │ │ │ ├── inheritance.defaults.pug │ │ │ ├── inheritance.extend.include.pug │ │ │ ├── inheritance.extend.mixins.block.pug │ │ │ ├── inheritance.extend.mixins.pug │ │ │ ├── inheritance.extend.pug │ │ │ ├── inheritance.extend.recursive.pug │ │ │ ├── inheritance.extend.whitespace.pug │ │ │ ├── inheritance.pug │ │ │ ├── inline-block-comment.pug │ │ │ ├── inline-tag.pug │ │ │ ├── intepolated-elements.pug │ │ │ ├── interpolated-mixin.pug │ │ │ ├── interpolation.escape.pug │ │ │ ├── javascript-new-lines.js │ │ │ ├── layout.append.pug │ │ │ ├── layout.append.without-block.pug │ │ │ ├── layout.multi.append.prepend.block.pug │ │ │ ├── layout.prepend.pug │ │ │ ├── layout.prepend.without-block.pug │ │ │ ├── mixin-at-end-of-file.pug │ │ │ ├── mixin-block-with-space.pug │ │ │ ├── mixin-hoist.pug │ │ │ ├── mixin-via-include.pug │ │ │ ├── mixin.attrs.pug │ │ │ ├── mixin.block-tag-behaviour.pug │ │ │ ├── mixin.blocks.pug │ │ │ ├── mixin.merge.pug │ │ │ ├── mixins-unused.pug │ │ │ ├── mixins.pug │ │ │ ├── mixins.rest-args.pug │ │ │ ├── namespaces.pug │ │ │ ├── nesting.pug │ │ │ ├── pipeless-comments.pug │ │ │ ├── pipeless-filters.pug │ │ │ ├── pipeless-tag.pug │ │ │ ├── pre.pug │ │ │ ├── quotes.pug │ │ │ ├── regression.1794.pug │ │ │ ├── regression.784.pug │ │ │ ├── script.whitespace.pug │ │ │ ├── scripts.non-js.pug │ │ │ ├── scripts.pug │ │ │ ├── self-closing-html.pug │ │ │ ├── single-period.pug │ │ │ ├── source.pug │ │ │ ├── styles.pug │ │ │ ├── tag-blocks.pug │ │ │ ├── tag.interpolation.pug │ │ │ ├── tags.self-closing.pug │ │ │ ├── template.pug │ │ │ ├── text-block.pug │ │ │ ├── text.pug │ │ │ ├── utf8bom.pug │ │ │ ├── vars.pug │ │ │ ├── while.pug │ │ │ ├── xml.pug │ │ │ ├── yield-before-conditional-head.pug │ │ │ ├── yield-before-conditional.pug │ │ │ ├── yield-head.pug │ │ │ ├── yield-title-head.pug │ │ │ ├── yield-title.pug │ │ │ └── yield.pug │ │ ├── check-lexer-functions.test.js │ │ ├── errors/ │ │ │ ├── attribute-invalid-expression.pug │ │ │ ├── case-with-invalid-expression.pug │ │ │ ├── case-with-no-expression.pug │ │ │ ├── default-with-expression.pug │ │ │ ├── else-with-condition.pug │ │ │ ├── extends-no-path.pug │ │ │ ├── include-filter-no-path-2.pug │ │ │ ├── include-filter-no-path.pug │ │ │ ├── include-filter-no-space.pug │ │ │ ├── include-no-path.pug │ │ │ ├── inconsistent-indentation.pug │ │ │ ├── interpolated-call.pug │ │ │ ├── invalid-class-name-1.pug │ │ │ ├── invalid-class-name-2.pug │ │ │ ├── invalid-class-name-3.pug │ │ │ ├── invalid-id.pug │ │ │ ├── malformed-each.pug │ │ │ ├── malformed-extend.pug │ │ │ ├── malformed-include.pug │ │ │ ├── mismatched-inline-tag.pug │ │ │ ├── mismatched-tag-interpolation.pug │ │ │ ├── multi-line-interpolation.pug │ │ │ ├── old-prefixed-each.pug │ │ │ ├── open-interpolation.pug │ │ │ ├── when-with-no-expression.pug │ │ │ └── while-with-no-expression.pug │ │ └── index.test.js │ ├── pug-linker/ │ │ ├── HISTORY.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.js │ │ ├── package.json │ │ └── test/ │ │ ├── __snapshots__/ │ │ │ └── index.test.js.snap │ │ ├── cases/ │ │ │ ├── include-extends-from-root.input.json │ │ │ ├── include-extends-of-common-template.input.json │ │ │ ├── include-extends-relative.input.json │ │ │ ├── include-filter-stylus.input.json │ │ │ ├── include-filter.input.json │ │ │ ├── include-only-text-body.input.json │ │ │ ├── include-only-text.input.json │ │ │ ├── include-with-text-head.input.json │ │ │ ├── include-with-text.input.json │ │ │ ├── include.script.input.json │ │ │ ├── include.yield.nested.input.json │ │ │ ├── includes-with-ext-js.input.json │ │ │ ├── includes.input.json │ │ │ ├── layout.append.input.json │ │ │ ├── layout.append.without-block.input.json │ │ │ ├── layout.multi.append.prepend.block.input.json │ │ │ ├── layout.prepend.input.json │ │ │ └── layout.prepend.without-block.input.json │ │ ├── cases-src/ │ │ │ ├── auxiliary/ │ │ │ │ ├── 1794-extends.pug │ │ │ │ ├── 1794-include.pug │ │ │ │ ├── blocks-in-blocks-layout.pug │ │ │ │ ├── dialog.pug │ │ │ │ ├── empty-block.pug │ │ │ │ ├── escapes.html │ │ │ │ ├── extends-empty-block-1.pug │ │ │ │ ├── extends-empty-block-2.pug │ │ │ │ ├── extends-from-root.pug │ │ │ │ ├── extends-relative.pug │ │ │ │ ├── filter-in-include.pug │ │ │ │ ├── includable.js │ │ │ │ ├── include-from-root.pug │ │ │ │ ├── inheritance.extend.mixin.block.pug │ │ │ │ ├── inheritance.extend.recursive-grand-grandparent.pug │ │ │ │ ├── inheritance.extend.recursive-grandparent.pug │ │ │ │ ├── inheritance.extend.recursive-parent.pug │ │ │ │ ├── layout.include.pug │ │ │ │ ├── layout.pug │ │ │ │ ├── mixin-at-end-of-file.pug │ │ │ │ ├── mixins.pug │ │ │ │ ├── pet.pug │ │ │ │ ├── smile.html │ │ │ │ ├── window.pug │ │ │ │ └── yield-nested.pug │ │ │ ├── include-extends-from-root.pug │ │ │ ├── include-extends-of-common-template.pug │ │ │ ├── include-extends-relative.pug │ │ │ ├── include-filter-coffee.coffee │ │ │ ├── include-filter-stylus.pug │ │ │ ├── include-filter.pug │ │ │ ├── include-only-text-body.pug │ │ │ ├── include-only-text.pug │ │ │ ├── include-with-text-head.pug │ │ │ ├── include-with-text.pug │ │ │ ├── include.script.pug │ │ │ ├── include.yield.nested.pug │ │ │ ├── includes-with-ext-js.pug │ │ │ ├── includes.pug │ │ │ ├── javascript-new-lines.js │ │ │ ├── layout.append.pug │ │ │ ├── layout.append.without-block.pug │ │ │ ├── layout.multi.append.prepend.block.pug │ │ │ ├── layout.prepend.pug │ │ │ ├── layout.prepend.without-block.pug │ │ │ ├── some-included.styl │ │ │ ├── some.md │ │ │ └── some.styl │ │ ├── errors/ │ │ │ ├── child-with-tags.input.json │ │ │ ├── extends-not-first.input.json │ │ │ └── unexpected-block.input.json │ │ ├── errors-src/ │ │ │ ├── child-with-tags.pug │ │ │ ├── extends-not-first.pug │ │ │ └── unexpected-block.pug │ │ ├── fixtures/ │ │ │ ├── append/ │ │ │ │ ├── app-layout.pug │ │ │ │ ├── layout.pug │ │ │ │ ├── page.html │ │ │ │ └── page.pug │ │ │ ├── append-without-block/ │ │ │ │ ├── app-layout.pug │ │ │ │ ├── layout.pug │ │ │ │ └── page.pug │ │ │ ├── empty.pug │ │ │ ├── layout.pug │ │ │ ├── mixins.pug │ │ │ ├── multi-append-prepend-block/ │ │ │ │ ├── redefine.pug │ │ │ │ └── root.pug │ │ │ ├── prepend/ │ │ │ │ ├── app-layout.pug │ │ │ │ ├── layout.pug │ │ │ │ ├── page.html │ │ │ │ └── page.pug │ │ │ └── prepend-without-block/ │ │ │ ├── app-layout.pug │ │ │ ├── layout.pug │ │ │ ├── page.html │ │ │ └── page.pug │ │ ├── index.test.js │ │ ├── special-cases/ │ │ │ ├── extending-empty.input.json │ │ │ ├── extending-include.input.json │ │ │ └── root-mixin.input.json │ │ └── special-cases-src/ │ │ ├── extending-empty.pug │ │ ├── extending-include.pug │ │ └── root-mixin.pug │ ├── pug-load/ │ │ ├── HISTORY.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.js │ │ ├── package.json │ │ └── test/ │ │ ├── __snapshots__/ │ │ │ └── index.test.js.snap │ │ ├── bar.pug │ │ ├── bing.pug │ │ ├── foo.pug │ │ ├── index.test.js │ │ └── script.js │ ├── pug-parser/ │ │ ├── HISTORY.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.js │ │ ├── lib/ │ │ │ └── inline-tags.js │ │ ├── package.json │ │ └── test/ │ │ ├── __snapshots__/ │ │ │ ├── index.test.js.snap │ │ │ └── no-unnecessary-blocks.test.js.snap │ │ ├── cases/ │ │ │ ├── attr-es2015.tokens.json │ │ │ ├── attrs-data.tokens.json │ │ │ ├── attrs.js.tokens.json │ │ │ ├── attrs.tokens.json │ │ │ ├── attrs.unescaped.tokens.json │ │ │ ├── basic.tokens.json │ │ │ ├── blanks.tokens.json │ │ │ ├── block-code.tokens.json │ │ │ ├── block-expansion.shorthands.tokens.json │ │ │ ├── block-expansion.tokens.json │ │ │ ├── blockquote.tokens.json │ │ │ ├── blocks-in-blocks.tokens.json │ │ │ ├── blocks-in-if.tokens.json │ │ │ ├── case-blocks.tokens.json │ │ │ ├── case.tokens.json │ │ │ ├── classes-empty.tokens.json │ │ │ ├── classes.tokens.json │ │ │ ├── code.conditionals.tokens.json │ │ │ ├── code.escape.tokens.json │ │ │ ├── code.iteration.tokens.json │ │ │ ├── code.tokens.json │ │ │ ├── comments-in-case.tokens.json │ │ │ ├── comments.source.tokens.json │ │ │ ├── comments.tokens.json │ │ │ ├── doctype.custom.tokens.json │ │ │ ├── doctype.default.tokens.json │ │ │ ├── doctype.keyword.tokens.json │ │ │ ├── each.else.tokens.json │ │ │ ├── escape-chars.tokens.json │ │ │ ├── escape-test.tokens.json │ │ │ ├── escaping-class-attribute.tokens.json │ │ │ ├── filter-in-include.tokens.json │ │ │ ├── filters-empty.tokens.json │ │ │ ├── filters.coffeescript.tokens.json │ │ │ ├── filters.custom.tokens.json │ │ │ ├── filters.include.custom.tokens.json │ │ │ ├── filters.include.tokens.json │ │ │ ├── filters.inline.tokens.json │ │ │ ├── filters.less.tokens.json │ │ │ ├── filters.markdown.tokens.json │ │ │ ├── filters.nested.tokens.json │ │ │ ├── filters.stylus.tokens.json │ │ │ ├── filters.verbatim.tokens.json │ │ │ ├── html.tokens.json │ │ │ ├── html5.tokens.json │ │ │ ├── include-extends-from-root.tokens.json │ │ │ ├── include-extends-of-common-template.tokens.json │ │ │ ├── include-extends-relative.tokens.json │ │ │ ├── include-only-text-body.tokens.json │ │ │ ├── include-only-text.tokens.json │ │ │ ├── include-with-text-head.tokens.json │ │ │ ├── include-with-text.tokens.json │ │ │ ├── include.script.tokens.json │ │ │ ├── include.yield.nested.tokens.json │ │ │ ├── includes-with-ext-js.tokens.json │ │ │ ├── includes.tokens.json │ │ │ ├── inheritance.alert-dialog.tokens.json │ │ │ ├── inheritance.defaults.tokens.json │ │ │ ├── inheritance.extend.include.tokens.json │ │ │ ├── inheritance.extend.mixins.block.tokens.json │ │ │ ├── inheritance.extend.mixins.tokens.json │ │ │ ├── inheritance.extend.recursive.tokens.json │ │ │ ├── inheritance.extend.tokens.json │ │ │ ├── inheritance.extend.whitespace.tokens.json │ │ │ ├── inheritance.tokens.json │ │ │ ├── inline-block-comment.tokens.json │ │ │ ├── inline-tag.tokens.json │ │ │ ├── intepolated-elements.tokens.json │ │ │ ├── interpolated-mixin.tokens.json │ │ │ ├── interpolation.escape.tokens.json │ │ │ ├── layout.append.tokens.json │ │ │ ├── layout.append.without-block.tokens.json │ │ │ ├── layout.multi.append.prepend.block.tokens.json │ │ │ ├── layout.prepend.tokens.json │ │ │ ├── layout.prepend.without-block.tokens.json │ │ │ ├── mixin-at-end-of-file.tokens.json │ │ │ ├── mixin-block-with-space.tokens.json │ │ │ ├── mixin-hoist.tokens.json │ │ │ ├── mixin-via-include.tokens.json │ │ │ ├── mixin.attrs.tokens.json │ │ │ ├── mixin.block-tag-behaviour.tokens.json │ │ │ ├── mixin.blocks.tokens.json │ │ │ ├── mixin.merge.tokens.json │ │ │ ├── mixins-unused.tokens.json │ │ │ ├── mixins.rest-args.tokens.json │ │ │ ├── mixins.tokens.json │ │ │ ├── namespaces.tokens.json │ │ │ ├── nesting.tokens.json │ │ │ ├── pipeless-comments.tokens.json │ │ │ ├── pipeless-filters.tokens.json │ │ │ ├── pipeless-tag.tokens.json │ │ │ ├── pre.tokens.json │ │ │ ├── quotes.tokens.json │ │ │ ├── regression.1794.tokens.json │ │ │ ├── regression.784.tokens.json │ │ │ ├── script.whitespace.tokens.json │ │ │ ├── scripts.non-js.tokens.json │ │ │ ├── scripts.tokens.json │ │ │ ├── self-closing-html.tokens.json │ │ │ ├── single-period.tokens.json │ │ │ ├── source.tokens.json │ │ │ ├── styles.tokens.json │ │ │ ├── tag-blocks.tokens.json │ │ │ ├── tag.interpolation.tokens.json │ │ │ ├── tags.self-closing.tokens.json │ │ │ ├── template.tokens.json │ │ │ ├── text-block.tokens.json │ │ │ ├── text.tokens.json │ │ │ ├── utf8bom.tokens.json │ │ │ ├── vars.tokens.json │ │ │ ├── while.tokens.json │ │ │ ├── xml.tokens.json │ │ │ ├── yield-before-conditional-head.tokens.json │ │ │ ├── yield-before-conditional.tokens.json │ │ │ ├── yield-head.tokens.json │ │ │ ├── yield-title-head.tokens.json │ │ │ ├── yield-title.tokens.json │ │ │ └── yield.tokens.json │ │ ├── index.test.js │ │ └── no-unnecessary-blocks.test.js │ ├── pug-runtime/ │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── build.js │ │ ├── index.js │ │ ├── package.json │ │ ├── prepublish.js │ │ ├── test/ │ │ │ └── index.test.js │ │ └── wrap.js │ ├── pug-strip-comments/ │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── index.js │ │ ├── package.json │ │ └── test/ │ │ ├── __snapshots__/ │ │ │ └── index.test.js.snap │ │ ├── cases/ │ │ │ ├── comments-in-case.input.json │ │ │ ├── comments.input.json │ │ │ └── comments.source.input.json │ │ ├── errors/ │ │ │ ├── comment-in-comment.input.json │ │ │ ├── end.input.json │ │ │ └── startstart.input.json │ │ └── index.test.js │ └── pug-walk/ │ ├── .gitignore │ ├── .travis.yml │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── package.json │ └── test/ │ └── index.test.js ├── scripts/ │ ├── buffer-serializer.js │ ├── filename-serializer.js │ ├── prebuild.js │ └── prettier-javascript-serializer.js └── tsconfig.json ================================================ FILE CONTENTS ================================================ ================================================ FILE: .editorconfig ================================================ root = true [*] charset = utf-8 indent_style = space indent_size = 2 tab_width = 2 end_of_line = lf insert_final_newline = true trim_trailing_whitespace = true ================================================ FILE: .gitattributes ================================================ * text=auto eol=lf ================================================ FILE: .github/FUNDING.yml ================================================ # These are supported funding model platforms github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] patreon: # Replace with a single Patreon username open_collective: pug ko_fi: # Replace with a single Ko-fi username tidelift: npm/pug community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry liberapay: # Replace with a single Liberapay username issuehunt: # Replace with a single IssueHunt username otechie: # Replace with a single Otechie username custom: # Replace with a single custom sponsorship URL ================================================ FILE: .github/ISSUE_TEMPLATE.md ================================================ **Pug Version:** your version number here **Node Version:** your version number here ## Input JavaScript Values ```js pug.renderFile('input.pug', { whatIsIt: 'language', }); ``` ## Input Pug ```pug h1 I Love Pug p It's a great #{whatIsIt} ``` ## Expected HTML ```html
It's a great language
``` ## Actual HTML ```htmlIt's a great language
``` ## Additional Comments ================================================ FILE: .github/workflows/rollingversions.yml ================================================ name: Release on: push: branches: - master repository_dispatch: types: [rollingversions_publish_approved] jobs: test: runs-on: ubuntu-latest strategy: matrix: node-version: [10.x, 12.x, 14.x] steps: - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v1 with: node-version: ${{ matrix.node-version }} - run: yarn install --frozen-lockfile - run: yarn prettier:check - run: yarn test publish-canary: runs-on: ubuntu-latest if: ${{ github.event_name == 'push' }} needs: test steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v1 with: node-version: 24.x registry-url: 'https://registry.npmjs.org' - run: yarn install --frozen-lockfile - run: yarn build - run: npx rollingversions publish --canary $GITHUB_RUN_NUMBER env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} publish: runs-on: ubuntu-latest if: ${{ github.event_name == 'repository_dispatch' }} needs: test steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v1 with: node-version: 24.x registry-url: 'https://registry.npmjs.org' - run: yarn install --frozen-lockfile - run: yarn build - run: npx rollingversions publish env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} permissions: id-token: write contents: write ================================================ FILE: .github/workflows/test.yml ================================================ name: Test on: pull_request: branches: - master jobs: test: runs-on: ubuntu-latest strategy: matrix: node-version: [10.x, 12.x, 14.x] steps: - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v1 with: node-version: ${{ matrix.node-version }} - run: yarn install --frozen-lockfile - run: yarn prettier:check - run: yarn test ================================================ FILE: .gitignore ================================================ .DS_Store .idea .vscode testing node_modules lib-cov coverage cov-pt* *.seed *.log *.csv *.dat *.out *.patch *.pid *.gz **/test/output* **/test/temp .release.json package-lock.json scripts/tsconfig.json packages/pug-error/lib ================================================ FILE: .prettierrc.js ================================================ module.exports = { bracketSpacing: false, singleQuote: true, trailingComma: 'all', overrides: [ { files: '*.js', options: { parser: 'babel', trailingComma: 'es5', }, }, ], }; ================================================ FILE: README.md ================================================You are amazing
Pug is a terse and simple templating language with a strong focus on performance and powerful features.
You are amazing
Pug is a terse and simple templating language with a strong focus on performance and powerful features.
================================================
FILE: packages/pug/test/browser/index.pug
================================================
!!! 5
html
head
body
textarea#input(placeholder='write pug here', style='width: 100%; min-height: 400px;').
p
author
!= myName
pre(style='background: #ECECEC;width: 100%; min-height: 400px;')
code#output
script(src='../../pug.js')
script.
var input = document.getElementById('input');
var output = document.getElementById('output');
setInterval(function () {
pug.render(input.value, {myName: 'Forbes Lindesay', pretty: true}, function (err, res) {
if (err) throw err;
output.textContent = res;
})
}, 500)
================================================
FILE: packages/pug/test/cases/attrs-data.html
================================================
:)
================================================ FILE: packages/pug/test/cases/auxiliary/window.pug ================================================ .window a(href='#').close Close block window-content ================================================ FILE: packages/pug/test/cases/auxiliary/yield-nested.pug ================================================ html head title body h1 Page #content #content-wrapper yield #footer stuff ================================================ FILE: packages/pug/test/cases/basic.html ================================================baz
================================================ FILE: packages/pug/test/cases/block-expansion.pug ================================================ ul li: a(href='#') foo li: a(href='#') bar p baz ================================================ FILE: packages/pug/test/cases/block-expansion.shorthands.html ================================================Try to define yourself by what you do, and you’ll burnout every time. You are. That is enough. I rest in that.
ajax contents
================================================ FILE: packages/pug/test/cases/blocks-in-if.pug ================================================ //- see https://github.com/pugjs/pug/issues/1589 -var ajax = true -if( ajax ) //- return only contents if ajax requests block contents p ajax contents -else //- return all html doctype html html head meta( charset='utf8' ) title sample body block contents p all contetns ================================================ FILE: packages/pug/test/cases/case-blocks.html ================================================you have a friend
================================================ FILE: packages/pug/test/cases/case-blocks.pug ================================================ html body - var friends = 1 case friends when 0 p you have no friends when 1 p you have a friend default p you have #{friends} friends ================================================ FILE: packages/pug/test/cases/case.html ================================================you have a friend
you have very few friends
Friend is a string
================================================ FILE: packages/pug/test/cases/case.pug ================================================ html body - var friends = 1 case friends when 0: p you have no friends when 1: p you have a friend default: p you have #{friends} friends - var friends = 0 case friends when 0 when 1 p you have very few friends default p you have #{friends} friends - var friend = 'Tim:G' case friend when 'Tim:G': p Friend is a string when {tim: 'g'}: p Friend is an object ================================================ FILE: packages/pug/test/cases/classes-empty.html ================================================ ================================================ FILE: packages/pug/test/cases/classes-empty.pug ================================================ a(class='') a(class=null) a(class=undefined) ================================================ FILE: packages/pug/test/cases/classes.html ================================================ ================================================ FILE: packages/pug/test/cases/classes.pug ================================================ a(class=['foo', 'bar', 'baz']) a.foo(class='bar').baz a.foo-bar_baz a(class={foo: true, bar: false, baz: true}) ================================================ FILE: packages/pug/test/cases/code.conditionals.html ================================================foo
foo
foo
bar
baz
bar
yay
================================================ FILE: packages/pug/test/cases/code.conditionals.pug ================================================ - if (true) p foo - else p bar - if (true) { p foo - } else { p bar - } if true p foo p bar p baz else p bar unless true p foo else p bar if 'nested' if 'works' p yay //- allow empty blocks if false else .bar if true .bar else .bing if false .bing else if false .bar else .foo ================================================ FILE: packages/pug/test/cases/code.escape.html ================================================<script>
================================================ FILE: packages/pug/test/cases/code.escape.pug ================================================ p= ' ================================================ FILE: packages/pug/test/cases/escape-chars.pug ================================================ script. var re = /\d+/; ================================================ FILE: packages/pug/test/cases/escape-test.html ================================================BEGINhtml
body
pre
include:custom(opt='val' num=2) filters.include.custom.pug
END
================================================
FILE: packages/pug/test/cases/filters.include.custom.pug
================================================
html
body
pre
include:custom(opt='val' num=2) filters.include.custom.pug
================================================
FILE: packages/pug/test/cases/filters.include.html
================================================
Just some markdown tests.
With new line.
================================================ FILE: packages/pug/test/cases/filters.include.pug ================================================ html body include:markdown-it some.md script include:coffee-script(minify=true) include-filter-coffee.coffee script include:coffee-script(minify=false) include-filter-coffee.coffee ================================================ FILE: packages/pug/test/cases/filters.inline.html ================================================before after
================================================ FILE: packages/pug/test/cases/filters.inline.pug ================================================ p before #[:cdata inside] after ================================================ FILE: packages/pug/test/cases/filters.less.html ================================================ ================================================ FILE: packages/pug/test/cases/filters.less.pug ================================================ html head style(type="text/css") :less @pad: 15px; body { padding: @pad; } ================================================ FILE: packages/pug/test/cases/filters.markdown.html ================================================This is some awesome markdown whoop.
================================================ FILE: packages/pug/test/cases/filters.markdown.pug ================================================ html body :markdown This is _some_ awesome **markdown** whoop. ================================================ FILE: packages/pug/test/cases/filters.nested.html ================================================ ================================================ FILE: packages/pug/test/cases/filters.nested.pug ================================================ script :cdata:uglify-js (function() { console.log('test') })() script :cdata:uglify-js:coffee-script (-> console.log 'test' )() ================================================ FILE: packages/pug/test/cases/filters.stylus.html ================================================ ================================================ FILE: packages/pug/test/cases/filters.stylus.pug ================================================ html head style(type="text/css") :stylus body padding: 50px body ================================================ FILE: packages/pug/test/cases/html.html ================================================You can embed html as well.
Even as the body of a block expansion.
================================================ FILE: packages/pug/test/cases/html.pug ================================================ - var version = 1449104952939The message is "hello world"
================================================ FILE: packages/pug/test/cases/include-only-text.pug ================================================ html body p include include-only-text-body.pug em hello world ================================================ FILE: packages/pug/test/cases/include-with-text-head.html ================================================ ================================================ FILE: packages/pug/test/cases/include-with-text-head.pug ================================================ head script(type='text/javascript'). alert('hello world'); ================================================ FILE: packages/pug/test/cases/include-with-text.html ================================================ ================================================ FILE: packages/pug/test/cases/include-with-text.pug ================================================ html include include-with-text-head.pug script(src='/caustic.js') script(src='/app.js') ================================================ FILE: packages/pug/test/cases/include.script.html ================================================ ================================================ FILE: packages/pug/test/cases/include.script.pug ================================================ script#pet-template(type='text/x-template') include auxiliary/pet.pug ================================================ FILE: packages/pug/test/cases/include.yield.nested.html ================================================some content
and some more
var x = '\n here is some \n new lined text';
================================================
FILE: packages/pug/test/cases/includes-with-ext-js.pug
================================================
pre
code
include javascript-new-lines.js
================================================
FILE: packages/pug/test/cases/includes.html
================================================
bar
:)
================================================ FILE: packages/pug/test/cases/includes.pug ================================================ include auxiliary/mixins.pug +foo body include auxiliary/smile.html include auxiliary/escapes.html script(type="text/javascript") include:verbatim auxiliary/includable.js ================================================ FILE: packages/pug/test/cases/inheritance.alert-dialog.html ================================================I'm an alert!
Some content
================================================ FILE: packages/pug/test/cases/inheritance.extend.include.html ================================================Some content
================================================ FILE: packages/pug/test/cases/inheritance.extend.include.pug ================================================ extend auxiliary/layout.include.pug block head script(src='jquery.js') block content h2 Page p Some content block window-content h2 Awesome p Now we can extend included blocks! ================================================ FILE: packages/pug/test/cases/inheritance.extend.mixins.block.html ================================================Hello World!
Foo bar baz!
================================================ FILE: packages/pug/test/cases/inheritance.extend.mixins.pug ================================================ extend auxiliary/layout.pug mixin article(title) if title h1= title block block content +article("The meaning of life") p Foo bar baz! ================================================ FILE: packages/pug/test/cases/inheritance.extend.pug ================================================ extend auxiliary/layout.pug block head script(src='jquery.js') block content h2 Page p Some content ================================================ FILE: packages/pug/test/cases/inheritance.extend.recursive.html ================================================Some content
================================================ FILE: packages/pug/test/cases/inheritance.extend.whitespace.pug ================================================ extend auxiliary/layout.pug block head script(src='jquery.js') block content h2 Page p Some content ================================================ FILE: packages/pug/test/cases/inheritance.html ================================================Some content
================================================ FILE: packages/pug/test/cases/inheritance.pug ================================================ extends auxiliary/layout.pug block head script(src='jquery.js') block content h2 Page p Some content ================================================ FILE: packages/pug/test/cases/inline-tag.html ================================================bing foo bong
bing foo [foo] bong
bing foo [foo] bong
#[strong escaped] #[escaped
================================================ FILE: packages/pug/test/cases/inline-tag.pug ================================================ p bing #[strong foo] bong p. bing #[strong foo] #[strong= '[foo]'] #[- var foo = 'foo]'] bong p | bing | #[strong foo] | #[strong= '[foo]'] | #[- var foo = 'foo]'] | bong p. \#[strong escaped] \#[#[strong escaped] ================================================ FILE: packages/pug/test/cases/intepolated-elements.html ================================================Some text with inline link
================================================ FILE: packages/pug/test/cases/intepolated-elements.pug ================================================ p #[a.rho(href='#', class='rho--modifier') with inline link] p Some text #[a.rho(href='#', class='rho--modifier')] p Some text #[a.rho(href='#', class='rho--modifier') with inline link] ================================================ FILE: packages/pug/test/cases/interpolated-mixin.html ================================================This also works http://www.bing.com so hurrah for Pug
================================================ FILE: packages/pug/test/cases/interpolated-mixin.pug ================================================ mixin linkit(url) a(href=url)= url p This also works #[+linkit('http://www.bing.com')] so hurrah for Pug ================================================ FILE: packages/pug/test/cases/interpolation.escape.html ================================================Last prepend must appear at top
Something prepended to content
Something appended to content
Last append must be most last
================================================ FILE: packages/pug/test/cases/layout.multi.append.prepend.block.pug ================================================ extends ../fixtures/multi-append-prepend-block/redefine.pug append content p.first.append Something appended to content prepend content p.first.prepend Something prepended to content append content p.last.append Last append must be most last prepend content p.last.prepend Last prepend must appear at top append head script(src='jquery.js') prepend head script(src='foo.js') ================================================ FILE: packages/pug/test/cases/layout.prepend.html ================================================ ================================================ FILE: packages/pug/test/cases/layout.prepend.pug ================================================ extends ../fixtures/prepend/app-layout.pug block prepend head script(src='foo.js') script(src='bar.js') ================================================ FILE: packages/pug/test/cases/layout.prepend.without-block.html ================================================ ================================================ FILE: packages/pug/test/cases/layout.prepend.without-block.pug ================================================ extends ../fixtures/prepend-without-block/app-layout.pug prepend head script(src='foo.js') script(src='bar.js') ================================================ FILE: packages/pug/test/cases/mixin-at-end-of-file.html ================================================ ================================================ FILE: packages/pug/test/cases/mixin-at-end-of-file.pug ================================================ include ./auxiliary/mixin-at-end-of-file.pug +slide() p some awesome content ================================================ FILE: packages/pug/test/cases/mixin-block-with-space.html ================================================bar
================================================ FILE: packages/pug/test/cases/mixin-via-include.pug ================================================ //- regression test for https://github.com/pugjs/pug/issues/1435 include ../fixtures/mixin-include.pug +bang ================================================ FILE: packages/pug/test/cases/mixin.attrs.html ================================================Some important content.
Even more important content.
Last content.
1
2
3
4
================================================ FILE: packages/pug/test/cases/mixin.attrs.pug ================================================ mixin centered(title) div.centered(id=attributes.id) - if (title) h1(class=attributes.class)= title block - if (attributes.href) .footer a(href=attributes.href) Back mixin main(title) div.stretch +centered(title).highlight&attributes(attributes) block mixin bottom div.bottom&attributes(attributes) block body +centered#First Hello World +centered('Section 1')#Second p Some important content. +centered('Section 2')#Third.foo(href='menu.html', class='bar') p Even more important content. +main('Section 3')(href='#') p Last content. +bottom.foo(class='bar', name='end', id='Last', data-attr='baz') p Some final words. +bottom(class=['class1', 'class2']) mixin foo div.thing(attr1='foo', attr2='bar')&attributes(attributes) - var val = 'I'm article foo
I'm a much longer text-only article, but you can still inline html tags in me if you want.
one
two
three
Two
Three
Two
Three
Two
Three
Two
Three
Two
Three
Two
Three
Two
Three
Two
Three
================================================ FILE: packages/pug/test/cases/mixin.merge.pug ================================================ mixin foo p.bar&attributes(attributes) One p.baz.quux&attributes(attributes) Two p&attributes(attributes) Three p.bar&attributes(attributes)(class="baz") Four body +foo.hello +foo#world +foo.hello#world +foo.hello.world +foo(class="hello") +foo.hello(class="world") +foo +foo&attributes({class: "hello"}) ================================================ FILE: packages/pug/test/cases/mixins-unused.html ================================================ ================================================ FILE: packages/pug/test/cases/mixins-unused.pug ================================================ mixin never-called .wtf This isn't something we ever want to output body ================================================ FILE: packages/pug/test/cases/mixins.html ================================================code sample
what is going on================================================ FILE: packages/pug/test/cases/pipeless-tag.pug ================================================ pre. what is #{'going'} #[| #{'on'}] ================================================ FILE: packages/pug/test/cases/pre.html ================================================
foo bar baz
foo
bar
baz
================================================
FILE: packages/pug/test/cases/pre.pug
================================================
pre.
foo
bar
baz
pre
code.
foo
bar
baz
================================================
FILE: packages/pug/test/cases/quotes.html
================================================
"foo"
'foo'
================================================ FILE: packages/pug/test/cases/quotes.pug ================================================ p "foo" p 'foo' ================================================ FILE: packages/pug/test/cases/regression.1794.html ================================================ ================================================ FILE: packages/pug/test/cases/regression.1794.pug ================================================ extends ./auxiliary/1794-extends.pug block content include ./auxiliary/1794-include.pug ================================================ FILE: packages/pug/test/cases/regression.784.html ================================================value
value
herefoo bar baz
foo bar baz
foo bar bazfoo
bar
baz
.
foo
bar
baz
.
foo
bar
baz
.
================================================
FILE: packages/pug/test/cases/text.pug
================================================
option(value='') -- (selected) --
p
p.
p
| foo
| bar
|
|
| baz
p.
foo
bar
baz
.
.
foo
bar
baz
pre
| foo
| bar
| baz
| .
pre.
foo
bar
baz
.
.
foo
bar
baz
.
================================================
FILE: packages/pug/test/cases/utf8bom.html
================================================
"foo"
================================================ FILE: packages/pug/test/cases/utf8bom.pug ================================================ p "foo" ================================================ FILE: packages/pug/test/cases/vars.html ================================================ ================================================ FILE: packages/pug/test/cases/vars.pug ================================================ - var foo = 'bar' - var list = [1,2,3] a(class=list, id=foo) ================================================ FILE: packages/pug/test/cases/while.html ================================================Look at twiddle-dee-dee
'; const output = pug.render(input, {plugins: [{lex}]}); expect(output).toEqual(expected); }); ================================================ FILE: packages/pug/test/pug.test.js ================================================ 'use strict'; var assert = require('assert'); var fs = require('fs'); var path = require('path'); var pug = require('../'); var perfTest = fs.readFileSync(__dirname + '/fixtures/perf.pug', 'utf8'); try { fs.mkdirSync(__dirname + '/temp'); } catch (ex) { if (ex.code !== 'EEXIST') { throw ex; } } describe('pug', function() { describe('unit tests with .render()', function() { it('should support doctypes', function() { assert.equal( '', pug.render('doctype xml') ); assert.equal('', pug.render('doctype html')); assert.equal('', pug.render('doctype foo bar baz')); assert.equal('', pug.render('doctype html')); assert.equal('', pug.render('doctype', {doctype: 'html'})); assert.equal( '', pug.render('doctype html', {doctype: 'xml'}) ); assert.equal('', pug.render('html')); assert.equal( '', pug.render('html', {doctype: 'html'}) ); assert.equal( 'foo', pug.render(Buffer.from('p foo'))); }); it('should support line endings', function() { var src = ['p', 'div', 'img']; var html = ['', '', ''foo'
", pug.render("p 'foo'")); assert.equal("'foo'
", pug.render("p\n | 'foo'")); assert.equal( '', pug.render("- var path = 'foo';\na(href='/' + path)") ); }); it('should support block-expansion', function() { assert.equal( '',
pug.render('pre\n code\n foo\n\n bar')
);
assert.equal('foo\n\nbar
', pug.render('p.\n foo\n\n bar')); assert.equal( 'foo\n\n\n\nbar
', pug.render('p.\n foo\n\n\n\n bar') ); assert.equal( 'foo\n bar\nfoo
', pug.render('p.\n foo\n bar\n foo') ); assert.equal( '', pug.render('script.\n s.parentNode.insertBefore(g,s)\n') ); assert.equal( '', pug.render('script.\n s.parentNode.insertBefore(g,s)') ); }); it('should support tag text', function() { assert.equal('some random text
', pug.render('p some random text')); assert.equal( 'clickGoogle.
', pug.render('p\n | click\n a Google\n | .') ); assert.equal('(parens)
', pug.render('p (parens)')); assert.equal( '(parens)
', pug.render('p(foo="bar") (parens)') ); assert.equal( '', pug.render('option(value="") -- (optional) foo --') ); }); it('should support tag text block', function() { assert.equal( 'foo \nbar \nbaz
', pug.render('p\n | foo \n | bar \n | baz') ); assert.equal( '', pug.render('label\n | Password:\n input') ); assert.equal( '', pug.render('label Password:\n input') ); }); it('should support tag text interpolation', function() { assert.equal( 'yo, pug is cool', pug.render('| yo, #{name} is cool\n', {name: 'pug'}) ); assert.equal( 'yo, pug is cool
', pug.render('p yo, #{name} is cool', {name: 'pug'}) ); assert.equal( 'yo, pug is cool', pug.render('| yo, #{name || "pug"} is cool', {name: null}) ); assert.equal( "yo, 'pug' is cool", pug.render('| yo, #{name || "\'pug\'"} is cool', {name: null}) ); assert.equal( 'foo <script> bar', pug.render('| foo #{code} bar', {code: '', '', '', ].join(''); assert.equal(html, pug.render(str)); }); it('should support comments', function() { // Regular var str = ['//foo', 'p bar'].join('\n'); var html = ['', 'bar
'].join(''); assert.equal(html, pug.render(str)); // Between tags var str = ['p foo', '// bar ', 'p baz'].join('\n'); var html = ['foo
', '', 'baz
'].join(''); assert.equal(html, pug.render(str)); // Quotes var str = "", js = "// script(src: '/js/validate.js') "; assert.equal(str, pug.render(js)); }); it('should support unbuffered comments', function() { var str = ['//- foo', 'p bar'].join('\n'); var html = ['bar
'].join(''); assert.equal(html, pug.render(str)); var str = ['p foo', '//- bar ', 'p baz'].join('\n'); var html = ['foo
', 'baz
'].join(''); assert.equal(html, pug.render(str)); }); it('should support literal html', function() { assert.equal( '', pug.render('') ); }); it('should support code', function() { assert.equal('test', pug.render('!= "test"')); assert.equal('test', pug.render('= "test"')); assert.equal('test', pug.render('- var foo = "test"\n=foo')); assert.equal( 'footestbar', pug.render('- var foo = "test"\n| foo\nem= foo\n| bar') ); assert.equal( 'test
This
is regular, javascript