GithubHelp home page GithubHelp logo

pugjs / pug Goto Github PK

View Code? Open in Web Editor NEW
21.5K 21.5K 2.0K 14.51 MB

Pug – robust, elegant, feature rich template engine for Node.js

Home Page: https://pugjs.org

HTML 5.99% JavaScript 78.43% CSS 0.01% CoffeeScript 0.04% Pug 15.01% Stylus 0.03% TypeScript 0.49%

pug's People

Contributors

3rd-eden avatar alubbe avatar caseywebdev avatar chowey avatar cleishm avatar conancat avatar droooney avatar eldargab avatar enlore avatar ezhlobo avatar forbeslindesay avatar hemanth avatar jserme avatar khingebjerg avatar kizu avatar kylekatarnls avatar logicalparadox avatar masylum avatar naltatis avatar notslang avatar pavel avatar pgherveou avatar rauchg avatar seanho avatar stuartpb avatar timothygu avatar tj avatar tricknotes avatar weakish avatar zackschuster avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pug's Issues

advantages over HAML?

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?)

Markdown "bleed"

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&rsquo;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.

html 5 mode

when using !!! 5 the output syntax should be altered

Different interpolation syntax

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 {{}}.

Add :less filter

we need the api to accept a callback :) which will unfortunately break it for Express right now but express needs some refactoring anyway

allow mixin of helpers ?

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)

Tags after block failing

#login
  h1 Login
  form(method="post")
    label(for="name")
      | Username:
      input(type="text", name="name")
    label(for="pass") 
      | Password:
      input(type="password", name="pass")

Error context for syntax errors

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

Port to haml.js

my haml.js implementation could use the same engine... pretty much

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.