1
0
mirror of https://github.com/mgerb/mywebsite synced 2026-01-12 10:52:47 +00:00

updated bunch of file paths and changed the way posts are loaded

This commit is contained in:
2016-01-05 12:28:04 -06:00
parent 4bb8cae81e
commit 6ab45fe935
13249 changed files with 317868 additions and 2101398 deletions

39
node_modules/parse5/lib/jsdom/jsdom_parser.js generated vendored Normal file
View File

@@ -0,0 +1,39 @@
'use strict';
var Parser = require('../tree_construction/parser'),
ParsingUnit = require('./parsing_unit');
//API
exports.parseDocument = function (html, treeAdapter) {
//NOTE: this should be reentrant, so we create new parser here
var parser = new Parser(treeAdapter),
parsingUnit = new ParsingUnit(parser);
//NOTE: override parser loop method
parser._runParsingLoop = function () {
parsingUnit.parsingLoopLock = true;
while (!parsingUnit.suspended && !this.stopped)
this._iterateParsingLoop();
parsingUnit.parsingLoopLock = false;
if (this.stopped)
parsingUnit.callback(this.document);
};
//NOTE: wait while parserController will be adopted by calling code, then
//start parsing
process.nextTick(function () {
parser.parse(html);
});
return parsingUnit;
};
exports.parseInnerHtml = function (innerHtml, contextElement, treeAdapter) {
//NOTE: this should be reentrant, so we create new parser here
var parser = new Parser(treeAdapter);
return parser.parseFragment(innerHtml, contextElement);
};

53
node_modules/parse5/lib/jsdom/parsing_unit.js generated vendored Normal file
View File

@@ -0,0 +1,53 @@
'use strict';
var ParsingUnit = module.exports = function (parser) {
this.parser = parser;
this.suspended = false;
this.parsingLoopLock = false;
this.callback = null;
};
ParsingUnit.prototype._stateGuard = function (suspend) {
if (this.suspended && suspend)
throw new Error('parse5: Parser was already suspended. Please, check your control flow logic.');
else if (!this.suspended && !suspend)
throw new Error('parse5: Parser was already resumed. Please, check your control flow logic.');
return suspend;
};
ParsingUnit.prototype.suspend = function () {
this.suspended = this._stateGuard(true);
return this;
};
ParsingUnit.prototype.resume = function () {
this.suspended = this._stateGuard(false);
//NOTE: don't enter parsing loop if it is locked. Without this lock _runParsingLoop() may be called
//while parsing loop is still running. E.g. when suspend() and resume() called synchronously.
if (!this.parsingLoopLock)
this.parser._runParsingLoop();
return this;
};
ParsingUnit.prototype.documentWrite = function (html) {
this.parser.tokenizer.preprocessor.write(html);
return this;
};
ParsingUnit.prototype.handleScripts = function (scriptHandler) {
this.parser.scriptHandler = scriptHandler;
return this;
};
ParsingUnit.prototype.done = function (callback) {
this.callback = callback;
return this;
};