Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doctype option added - Fixes #19 #24

Merged
merged 1 commit into from
Nov 4, 2015
Merged

Conversation

muratcorlu
Copy link
Contributor

Caution: I set HTML5 as default doctype.

Usage:

{test: /\.jade$/, loader: 'jade?doctype=xhtml', exclude: /node_modules/}

Fixes #19

@colelawrence
Copy link

This is interesting, because I would argue that the doctype should not be
appended to the template unless explicitly specified. This is because in
every case where I use jade-loader, I'm using it for templates --- small
snippets of html for Angular templates or similar. It would be
inappropriate for these individual templates to each have a doctype.

On Thu, Sep 17, 2015, 3:19 AM Murat Çorlu notifications@github.com wrote:

Caution: I set HTML5 as default doctype.

Usage:

{test: /.jade$/, loader: 'jade?doctype=xhtml', exclude: /node_modules/}


You can view, comment on, or merge this pull request online at:

#24
Commit Summary

  • Doctype option added

File Changes

Patch Links:


Reply to this email directly or view it on GitHub
#24.

@MikaAK
Copy link

MikaAK commented Sep 17, 2015

+1 for this. From the Jade Docs you can pass a doctype explicitly as well to be used for every file.

Not having a doctype causes some bugs in the non index file becuase things like div(ui-view) get parsed into <div ui-view='ui-view'></div> instead of <div ui-view></div>

@visnup
Copy link

visnup commented Sep 30, 2015

+1. We have the same use case as @MikaAK where jade can't infer the doctype (html) from the snippets we send it and specifically <div ui-view></div> gets messed up. instead in our jade templates we end up having to write div( ui-view="" ) which isn't horrible, but noisy.

@MikaAK
Copy link

MikaAK commented Nov 4, 2015

@sokra Any chance on reviewing this please? 😄

sokra added a commit that referenced this pull request Nov 4, 2015
Doctype option added - Fixes #19
@sokra sokra merged commit d31b0d3 into pugjs:master Nov 4, 2015
@sokra
Copy link
Collaborator

sokra commented Nov 4, 2015

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants