pugjs / pug Goto Github PK
View Code? Open in Web Editor NEWPug – robust, elegant, feature rich template engine for Node.js
Home Page: https://pugjs.org
Pug – robust, elegant, feature rich template engine for Node.js
Home Page: https://pugjs.org
Nice to see you've removed the pesky % tag :-) --- I was trying to get Nathan et al to do the same for Haml. But I was wondering - what else is different/better ? (Simpler codebase?)
I am seeing a bit of strange behavior when using the markdown filter. Something has a tendency to "bleed" into the input markdown is interpreting. For example, this is a bit of output of a markdown line rendered using the jade.renderFile operation.
:markdown
| Don't have an account? [Create one](/account/new).
DEBUG:
buf.push('<p>Don’t have an account? <a href="/a/new">Create one</a>.</p>illiseconds.');
The "illesconds" part isn't part of the line, nor is it anywhere in my app, suspiciously. And it seems to vary between page refreshes. Sometimes it works fine, but on occasion, the app will crash because javascript code bleeds. Here is an example of a crash when running your example...
/Users/jakeluer/Code/node/project/deps/jade/examples/markdown.jade:4
buf.push('<p>Woah! jade <em>and</em> markdown, very <strong>cool</strong>\nwe
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Unexpected token ILLEGAL
at Object.render (/Users/jakeluer/Code/node/project/deps/jade/lib/jade.js:704:17)
at /Users/jakeluer/Code/node/project/deps/jade/lib/jade.js:740:34
at fs:81:13
at node.js:221:9
Please let me know if you have any questions, or need me to test something.
indentation sexyness
currently not very helpful
Tag it, promote it
works
#{typeof foo == "undefined" ? "bar" : "baz"}
fails
#{typeof foo == "undefined" ? 'bar' : 'baz'}
when using !!! 5
the output syntax should be altered
last 3 (setting) lines
get on it self!
as per requested
Not an issue, more of a suggestion: The ruby-esque #{}
delimiter visually conflicts with #ids
, making it not so ideal.. I would suggest something like ${}
or {}
or {{}}
.
using http://github.com/miksago/jade browser branch :)
we need the api to accept a callback :) which will unfortunately break it for Express right now but express needs some refactoring anyway
this should not be visitfoo ideally when a trailing space is present:
ul
li visit
a(href="/foo") foo
to not include the attr
h1(class="blog-post-" + id)
failed
What do you think of a Railesque, helper mixin, e.g.
render( "index.jade", { locals: {person: p}, helpers: [ require("helpers"), require("person_helpers") ] } p = personHTML(p)
huge memory and cpu spike when using jade with express
#login
h1 Login
form(method="post")
label(for="name")
| Username:
input(type="text", name="name")
label(for="pass")
| Password:
input(type="password", name="pass")
store the last n indents
The intermediate js is passed to new Function()
which can throw if there is a syntax error. I will try and wrap this and see what I can do to provide better error reporting
seems wonky, infinite loop
The "//<![CDATA[" hack has not been necessary since Netscape 1 when the script tag was first introduced :)
my haml.js implementation could use the same engine... pretty much
people dont like having the indents match the current indentation level
not just the intermediate js... WAhHOAsdf
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.