homunculus
Advanced tools
Comparing version 0.4.1 to 0.4.2
{ | ||
"name": "homunculus", | ||
"version": "0.4.1", | ||
"version": "0.4.2", | ||
"description": "A lexer&parser by Javascript", | ||
@@ -5,0 +5,0 @@ "maintainers": [ |
@@ -0,0 +0,0 @@ var IParser = require('../Parser'); |
@@ -49,2 +49,4 @@ var IParser = require('../Parser'); | ||
this.length = 0; | ||
this.script = false; | ||
this.style = false; | ||
this.ignores = {}; | ||
@@ -90,2 +92,5 @@ this.hasMoveLine = false; | ||
var node = new Node(Node.MARK); | ||
if(this.script || this.style) { | ||
this.error(tagName + ' could not contain any mark.'); | ||
} | ||
node.add(this.match('<')); | ||
@@ -121,5 +126,14 @@ if(!this.look) { | ||
if(this.look.content() == '/>') { | ||
if(['script', 'style'].indexOf(tagName) > -1) { | ||
this.error(tagName + ' could not be single.'); | ||
} | ||
node.add(this.match('/>')); | ||
} | ||
else { | ||
if(tagName == 'script') { | ||
this.script = true; | ||
} | ||
else if(tagName == 'style') { | ||
this.style = true; | ||
} | ||
node.add(this.match('>')); | ||
@@ -141,2 +155,3 @@ if(!this.look) { | ||
node.add(this.match('>')); | ||
this.script = this.style = false; | ||
} | ||
@@ -143,0 +158,0 @@ } |
@@ -50,2 +50,4 @@ define(function(require, exports, module) { | ||
this.length = 0; | ||
this.script = false; | ||
this.style = false; | ||
this.ignores = {}; | ||
@@ -91,2 +93,5 @@ this.hasMoveLine = false; | ||
var node = new Node(Node.MARK); | ||
if(this.script || this.style) { | ||
this.error(tagName + ' could not contain any mark.'); | ||
} | ||
node.add(this.match('<')); | ||
@@ -122,5 +127,14 @@ if(!this.look) { | ||
if(this.look.content() == '/>') { | ||
if(['script', 'style'].indexOf(tagName) > -1) { | ||
this.error(tagName + ' could not be single.'); | ||
} | ||
node.add(this.match('/>')); | ||
} | ||
else { | ||
if(tagName == 'script') { | ||
this.script = true; | ||
} | ||
else if(tagName == 'style') { | ||
this.style = true; | ||
} | ||
node.add(this.match('>')); | ||
@@ -142,2 +156,3 @@ if(!this.look) { | ||
node.add(this.match('>')); | ||
this.script = this.style = false; | ||
} | ||
@@ -144,0 +159,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
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
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14843
509387
77