Socket
Socket
Sign inDemoInstall

htmlbars

Package Overview
Dependencies
Maintainers
2
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

htmlbars - npm Package Compare versions

Comparing version 0.1.10 to 0.1.11

4

dist/cjs/htmlbars-compiler-tests/html_compiler_test.js

@@ -214,2 +214,6 @@ "use strict";

test('The compiler can handle comments with no parent element', function() {
compilesTo('<!-- {{foo}} -->');
});
// TODO: Revisit partial syntax.

@@ -216,0 +220,0 @@ // test("The compiler can handle partials in handlebars partial syntax", function() {

4

dist/cjs/htmlbars-compiler/compiler/fragment_opcode.js

@@ -28,5 +28,5 @@ "use strict";

FragmentOpcodeCompiler.prototype.comment = function(comment) {
FragmentOpcodeCompiler.prototype.comment = function(comment, childIndex, childCount, isSingleRoot) {
this.opcode('createComment', [comment.chars]);
this.opcode('appendChild');
if (!isSingleRoot) { this.opcode('appendChild'); }
};

@@ -33,0 +33,0 @@

@@ -205,4 +205,5 @@ "use strict";

var frame = this.getCurrentFrame();
var isSingleRoot = frame.parentNode.type === 'program' && frame.childCount === 1;
frame.actions.push(['comment', [text, frame.childIndex, frame.childCount, true]]);
frame.actions.push(['comment', [text, frame.childIndex, frame.childCount, isSingleRoot]]);
};

@@ -209,0 +210,0 @@

@@ -7,3 +7,3 @@ "use strict";

* See https://raw.githubusercontent.com/tildeio/htmlbars/master/LICENSE
* @version 0.1.10
* @version 0.1.11
*/

@@ -10,0 +10,0 @@

@@ -27,5 +27,5 @@ import TemplateVisitor from "./template_visitor";

FragmentOpcodeCompiler.prototype.comment = function(comment) {
FragmentOpcodeCompiler.prototype.comment = function(comment, childIndex, childCount, isSingleRoot) {
this.opcode('createComment', [comment.chars]);
this.opcode('appendChild');
if (!isSingleRoot) { this.opcode('appendChild'); }
};

@@ -32,0 +32,0 @@

@@ -204,4 +204,5 @@ var push = Array.prototype.push;

var frame = this.getCurrentFrame();
var isSingleRoot = frame.parentNode.type === 'program' && frame.childCount === 1;
frame.actions.push(['comment', [text, frame.childIndex, frame.childCount, true]]);
frame.actions.push(['comment', [text, frame.childIndex, frame.childCount, isSingleRoot]]);
};

@@ -208,0 +209,0 @@

@@ -6,3 +6,3 @@ /*

* See https://raw.githubusercontent.com/tildeio/htmlbars/master/LICENSE
* @version 0.1.10
* @version 0.1.11
*/

@@ -9,0 +9,0 @@

var packagesConfig = {
"version": "0.1.10",
"revision": "d32e5b566b2f38532bbfdd11889a3b9f3136fa8c",
"version": "0.1.11",
"revision": "09230391c8222d1d75fcff84b704a24fed70c17d",
"vendored": {},

@@ -5,0 +5,0 @@ "dependencies": {

{
"name": "htmlbars",
"version": "0.1.10",
"version": "0.1.11",
"description": "HTMLBars compiles Handlebars templates into document fragments rather than string buffers",
"main": "dist/cjs/htmlbars.js",
"scripts": {
"prepublish": "bower install",
"prepublish": "bower install && bin/build.js",
"build": "bin/build.js",

@@ -9,0 +9,0 @@ "pretest": "bin/build.js",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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