Comparing version 1.1.4 to 1.1.5
@@ -0,4 +1,7 @@ | ||
'use strict'; | ||
exports.Parser = require('./lib/tree_construction/parser'); | ||
exports.SimpleApiParser = require('./lib/simple_api/simple_api_parser'); | ||
exports.TreeSerializer = require('./lib/tree_serialization/tree_serializer'); | ||
exports.JsDomParser = require('./lib/jsdom/jsdom_parser'); | ||
@@ -5,0 +8,0 @@ exports.TreeAdapters = { |
@@ -0,1 +1,3 @@ | ||
'use strict'; | ||
var Tokenizer = require('../tokenization/tokenizer'), | ||
@@ -192,4 +194,4 @@ HTML = require('./html'); | ||
if (tn === $.FONT && (Tokenizer.getTokenAttr(startTagToken, ATTRS.COLOR) !== null || | ||
Tokenizer.getTokenAttr(startTagToken, ATTRS.SIZE) !== null || | ||
Tokenizer.getTokenAttr(startTagToken, ATTRS.FACE) !== null)) { | ||
Tokenizer.getTokenAttr(startTagToken, ATTRS.SIZE) !== null || | ||
Tokenizer.getTokenAttr(startTagToken, ATTRS.FACE) !== null)) { | ||
return true; | ||
@@ -196,0 +198,0 @@ } |
@@ -0,1 +1,3 @@ | ||
'use strict'; | ||
var NS = exports.NAMESPACES = { | ||
@@ -2,0 +4,0 @@ HTML: 'http://www.w3.org/1999/xhtml', |
@@ -0,5 +1,6 @@ | ||
'use strict'; | ||
exports.REPLACEMENT_CHARACTER = '\uFFFD'; | ||
exports.CODE_POINTS = { | ||
UNDEFINED: -2, | ||
EOF: -1, | ||
@@ -6,0 +7,0 @@ NULL: 0x00, |
@@ -0,1 +1,3 @@ | ||
'use strict'; | ||
var Tokenizer = require('../tokenization/tokenizer'), | ||
@@ -2,0 +4,0 @@ TokenizerProxy = require('./tokenizer_proxy'); |
@@ -0,1 +1,3 @@ | ||
'use strict'; | ||
var Tokenizer = require('../tokenization/tokenizer'), | ||
@@ -2,0 +4,0 @@ ForeignContent = require('../common/foreign_content'), |
@@ -0,1 +1,3 @@ | ||
'use strict'; | ||
var UNICODE = require('../common/unicode'); | ||
@@ -27,11 +29,9 @@ | ||
//Preprocessor | ||
//NOTE: HTML input preprocessing | ||
//(see: http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#preprocessing-the-input-stream) | ||
var Preprocessor = module.exports = function (html) { | ||
//NOTE: All U+000D CARRIAGE RETURN (CR) characters must be converted to U+000A LINE FEED (LF) characters. | ||
//Any U+000A LINE FEED (LF) characters that immediately follow a U+000D CARRIAGE RETURN (CR) character | ||
//must be ignored. | ||
this.html = html.replace(CARRIAGE_RETURN_NEW_LINE_REGEX, '\n'); | ||
this.write(html); | ||
//NOTE: one leading U+FEFF BYTE ORDER MARK character must be ignored if any are present in the input stream. | ||
this.pos = this.html.charCodeAt(0) === $.BOM ? 0 : -1; | ||
this.lastCharPos = this.html.length - 1; | ||
@@ -42,4 +42,21 @@ this.gapStack = []; | ||
//NOTE: HTML input preprocessing | ||
//(see: http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#preprocessing-the-input-stream) | ||
Preprocessor.prototype.write = function (html) { | ||
//NOTE: All U+000D CARRIAGE RETURN (CR) characters must be converted to U+000A LINE FEED (LF) characters. | ||
//Any U+000A LINE FEED (LF) characters that immediately follow a U+000D CARRIAGE RETURN (CR) character | ||
//must be ignored. | ||
html = html.replace(CARRIAGE_RETURN_NEW_LINE_REGEX, '\n'); | ||
if (this.html) { | ||
this.html = this.html.substring(0, this.pos + 1) + | ||
html + | ||
this.html.substring(this.pos + 1, this.html.length); | ||
} | ||
else | ||
this.html = html; | ||
this.lastCharPos = this.html.length - 1; | ||
}; | ||
Preprocessor.prototype.advanceAndPeekCodePoint = function () { | ||
@@ -46,0 +63,0 @@ this.pos++; |
@@ -0,1 +1,3 @@ | ||
'use strict'; | ||
//Node construction | ||
@@ -2,0 +4,0 @@ exports.createDocument = function () { |
@@ -0,1 +1,3 @@ | ||
'use strict'; | ||
//Node construction | ||
@@ -30,2 +32,3 @@ exports.createDocument = | ||
name: tagName, | ||
tagName: tagName, | ||
namespace: namespaceURI, | ||
@@ -32,0 +35,0 @@ attribs: attribs, |
@@ -0,1 +1,3 @@ | ||
'use strict'; | ||
//Const | ||
@@ -2,0 +4,0 @@ var VALID_DOCTYPE_NAME = 'html', |
@@ -0,1 +1,3 @@ | ||
'use strict'; | ||
//Const | ||
@@ -2,0 +4,0 @@ var NOAH_ARK_CAPACITY = 3; |
@@ -0,1 +1,3 @@ | ||
'use strict'; | ||
var HTML = require('../common/html'); | ||
@@ -2,0 +4,0 @@ |
@@ -0,1 +1,3 @@ | ||
'use strict'; | ||
var DefaultTreeAdapter = require('../tree_adapters/default'), | ||
@@ -2,0 +4,0 @@ HTML = require('../common/html'); |
{ | ||
"name": "parse5", | ||
"description": "WHATWG HTML5 specification-compliant, fast and ready for production HTML parsing/serialization toolset for Node.", | ||
"version": "1.1.4", | ||
"version": "1.1.5", | ||
"author": "Ivan Nikulin <ifaaan@gmail.com> (https://github.com/inikulin)", | ||
@@ -10,4 +10,5 @@ "contributors": [ | ||
], | ||
"homepage": "http://inikulin.github.io/parse5/", | ||
"devDependencies": { | ||
"nodeunit": "0.8.0" | ||
"mocha": "1.21.4" | ||
}, | ||
@@ -14,0 +15,0 @@ "keywords": [ |
@@ -5,3 +5,3 @@ <p align="center"> | ||
[![Build Status](http://img.shields.io/travis/inikulin/parse5.svg?style=flat-square)](https://travis-ci.org/inikulin/parse5) | ||
[![Build Status](https://api.travis-ci.org/inikulin/parse5.svg)](https://travis-ci.org/inikulin/parse5) | ||
@@ -8,0 +8,0 @@ *WHATWG HTML5 specification-compliant, fast and ready for production HTML parsing/serialization toolset for Node.* |
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
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
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
374669
21
6089
0