-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
include and block #997
Comments
Please format the code using ````` |
I've added formatting (yay for being able to edit other people's posts) |
I think I am having the same issue. I am using version 0.30.0 from npm. It looks like for layout.jade doctype strict
html(xmlns="http://www.w3.org/1999/xhtml",xml:lang="en-US", lang="en-US")
head
block head
script(src='/vendor/jquery.js')
script(src='/vendor/caustic.js')
body
include includes/header
include includes/header
include includes/header
include includes/header
block content login.jade extends layout
append head
script(src='/vendor/three.js')
login.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
<head>
<script src="/vendor/jquery.js"></script>
<script src="/vendor/caustic.js"></script>
<script src="/vendor/three.js"></script>
<script src="/vendor/three.js"></script>
<script src="/vendor/three.js"></script>
<script src="/vendor/three.js"></script>
<script src="/vendor/three.js"></script>
</head>
<body>
</body>
</html> |
Same issue here. |
any updates on this |
I had the same "triple" block effect only when deploying to heroku (locally it was fine), and I was able to resolve it by specifying the version of jade to deploy to heroku in my package.json file:
|
Same problem. 0.28.2 works fine but 0.30.0 not. |
Also having this issue of duplicated output for "block append" v0.29.0 works fine. |
This is hopefully fixed by the latest version. |
@triccardi-systran any chance you could submit a pull request with some failing unit tests? |
From #1261: Issue 1 desn't return what I expect because block append also return its block value to its parent, like normal block. If we are OK for this point, I'm willing to write multiple unit tests to validate these behaviors. For Issue 2 it seems the included block appends are handled before the block appends in the current .jade. I can write a unit test for that too, but I won't do it just for this point (too much overhead). Issue 3 is in fact the combination of Issue 1 and Issue 2. |
It does sound like both issue 1 and issue 2 are bugs. It's very difficult to see exactly what is going on from purely a post in an issue though. Writing a unit test will make it a lot clearer what you are doing, and will therefore make it easier to fix it. |
I have a layout.jade
layout.jade
i have page1.jade
and page2.jade is
the included page comes with the script at the end of page1 not at the top of the page1 along with other scripts..The script after the include page is added to to the top of page(and it is added once more again??). should not the page2 be included and then the extension be applied so that we can same behavior as .other append right after the include.
The text was updated successfully, but these errors were encountered: