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

Is it possible to set the docytype? #40

Closed
weotch opened this issue Mar 5, 2018 · 5 comments
Closed

Is it possible to set the docytype? #40

weotch opened this issue Mar 5, 2018 · 5 comments

Comments

@weotch
Copy link

weotch commented Mar 5, 2018

Is there a way to set the doctype globally?

@ForbesLindesay
Copy link
Member

The doctype shouldn't make any difference in react-pug

@weotch
Copy link
Author

weotch commented Mar 6, 2018

It does for interpretation of attributes. Like whether video(autoplay) becomes <video autoplay> or <video autoplay="autoplay">. If I want the former, is there a way outside of doctype to tell Pug how to treat the attribute?

@ForbesLindesay
Copy link
Member

If you're actually using this library, video(autoplay) probably doesn't work yet (see #33). If you do video(autoplay=true) that will be equivalent to the jsx code <video autoplay={true} />. There are other implementations of pug -> jsx, so it's possible you're using one of those.

@weotch
Copy link
Author

weotch commented Mar 7, 2018

I was evaulating the library to see if it would work for our project. You're right, I addn't tried that specific example.

@ezhlobo
Copy link
Member

ezhlobo commented Mar 20, 2018

@weotch hey, PR #33 was merged. Could you re-check, does everything work well for you?

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

No branches or pull requests

3 participants