Socket
Socket
Sign inDemoInstall

jade

Package Overview
Dependencies
Maintainers
0
Versions
131
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jade - npm Package Compare versions

Comparing version 0.9.2 to 0.9.3

jade.min.js

11

History.md
0.9.3 / 2011-03-24
==================
* Added `Block#unshift(node)`
* Added `jade.js` for the client-side to the repo
* Added `jade.min.js` for the client-side to the repo
* Removed need for pipes in filters. Closes #185
Note that this _will_ break filters used to
manipulate the AST, until we have a different
syntax for doing so.
0.9.2 / 2011-03-23

@@ -3,0 +14,0 @@ ==================

39

jade.js

@@ -518,3 +518,3 @@

exports.version = '0.8.9';
exports.version = '0.9.3';

@@ -1416,2 +1416,14 @@ /**

/**
* Unshift the given `node`.
*
* @param {Node} node
* @return {Number}
* @api public
*/
Block.prototype.unshift = function(node){
return this.nodes.unshift(node);
};
}); // module: nodes/block.js

@@ -2029,3 +2041,3 @@

/**
* filter attrs? (text | block)
* filter attrs? text-block
*/

@@ -2038,12 +2050,5 @@

if ('text' == tok.val) {
this.lexer.textPipe = false;
block = this.parseTextBlock();
this.lexer.textPipe = true;
return block;
} else if ('text' == this.lookahead(2).type) {
block = this.parseTextBlock();
} else {
block = this.parseBlock();
}
this.lexer.textPipe = false;
block = this.parseTextBlock();
this.lexer.textPipe = true;

@@ -2083,3 +2088,3 @@ var node = new nodes.Filter(tok.val, block, attrs && attrs.attrs);

text.push('\\n');
text.push(this.parseTextBlock().map(function(text){
text.push(this.parseTextBlock().nodes.map(function(text){
return ' ' + text;

@@ -2173,8 +2178,2 @@ }).join(''));

// Assume newline when tag followed by text
if (this.peek().type === 'text') {
if (tag.text) tag.text.push('\\n');
else tag.text = new nodes.Text('\\n');
}
tag.textOnly = tag.textOnly || ~textOnly.indexOf(tag.name);

@@ -2251,3 +2250,3 @@

var interpolate = exports.interpolate = function(str){
return str.replace(/(\\)?([#$!]){(.*?)}/g, function(str, escape, flag, code){
return str.replace(/(\\)?([#!]){(.*?)}/g, function(str, escape, flag, code){
return escape

@@ -2254,0 +2253,0 @@ ? str

@@ -22,3 +22,3 @@

exports.version = '0.9.2';
exports.version = '0.9.3';

@@ -25,0 +25,0 @@ /**

@@ -43,1 +43,13 @@

};
/**
* Unshift the given `node`.
*
* @param {Node} node
* @return {Number}
* @api public
*/
Block.prototype.unshift = function(node){
return this.nodes.unshift(node);
};

@@ -249,3 +249,3 @@

/**
* filter attrs? (text | block)
* filter attrs? text-block
*/

@@ -258,12 +258,5 @@

if ('text' == tok.val) {
this.lexer.textPipe = false;
block = this.parseTextBlock();
this.lexer.textPipe = true;
return block;
} else if ('text' == this.lookahead(2).type) {
block = this.parseTextBlock();
} else {
block = this.parseBlock();
}
this.lexer.textPipe = false;
block = this.parseTextBlock();
this.lexer.textPipe = true;

@@ -270,0 +263,0 @@ var node = new nodes.Filter(tok.val, block, attrs && attrs.attrs);

{
"name": "jade",
"description": "Jade template engine",
"version": "0.9.2",
"version": "0.9.3",
"author": "TJ Holowaychuk <tj@vision-media.ca>",

@@ -6,0 +6,0 @@ "main": "./index.js",

@@ -29,3 +29,2 @@

- :cdata
- :text
- :coffeescript must have [coffee-script](http://jashkenas.github.com/coffee-script/) installed

@@ -187,15 +186,2 @@ - [Vim Syntax](https://github.com/digitaltoad/vim-jade)

Alternatively if you decide no inline tags are needed, you may use the `:text` filter:
html
head
title Example
p
:text
You can place any text,
that you like here
even if it is indented really
strange
.
Once again as an alternative, we may use a leading '.' to indicate a text block, for example:

@@ -371,4 +357,4 @@

:markdown
| Woah! jade _and_ markdown, very **cool**
| we can even link to [stuff](http://google.com)
Woah! jade _and_ markdown, very **cool**
we can even link to [stuff](http://google.com)

@@ -379,3 +365,3 @@ Renders:

Filters may also now manipulate the parse tree. For example perhaps I want to
Filters may also manipulate the parse tree. For example perhaps I want to
bake conditionals right into jade, we could do so with a filter named _conditionals_. Typically filters work on text blocks, however by passing a regular block our filter can do anything it wants with the tags nested within it.

@@ -382,0 +368,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc