How to use the entities/maps/legacy.json.hasOwnProperty function in entities

To help you get started, we’ve selected a few entities examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Rainbox-dev / DuAEF_Duik / Release / Duik-API / src-doc / tui-jsdoc-template / node_modules / htmlparser2 / lib / Tokenizer.js View on Github external
Tokenizer.prototype._parseLegacyEntity = function() {
    var start = this._sectionStart + 1,
        limit = this._index - start;

    if (limit > 6) limit = 6; //the max length of legacy entities is 6

    while (limit >= 2) {
        //the min length of legacy entities is 2
        var entity = this._buffer.substr(start, limit);

        if (legacyMap.hasOwnProperty(entity)) {
            this._emitPartial(legacyMap[entity]);
            this._sectionStart += limit + 1;
            return;
        } else {
            limit--;
        }
    }
};
github victorporof / Sublime-JSHint / scripts / node_modules / htmlparser2 / lib / Tokenizer.js View on Github external
Tokenizer.prototype._parseLegacyEntity = function(){
	var start = this._sectionStart + 1,
	    limit = this._index - start;

	if(limit > 6) limit = 6; //the max length of legacy entities is 6

	while(limit >= 2){ //the min length of legacy entities is 2
		var entity = this._buffer.substr(start, limit);

		if(legacyMap.hasOwnProperty(entity)){
			this._emitPartial(legacyMap[entity]);
			this._sectionStart += limit + 1;
			return;
		} else {
			limit--;
		}
	}
};
github charlielin99 / Jobalytics / node_modules / htmlparser2 / lib / Tokenizer.js View on Github external
Tokenizer.prototype._parseLegacyEntity = function(){
	var start = this._sectionStart + 1,
	    limit = this._index - start;

	if(limit > 6) limit = 6; //the max length of legacy entities is 6

	while(limit >= 2){ //the min length of legacy entities is 2
		var entity = this._buffer.substr(start, limit);

		if(legacyMap.hasOwnProperty(entity)){
			this._emitPartial(legacyMap[entity]);
			this._sectionStart += limit + 1;
			return;
		} else {
			limit--;
		}
	}
};
github mowlc / real-estate-scraper / node_modules / htmlparser2 / lib / Tokenizer.js View on Github external
Tokenizer.prototype._parseLegacyEntity = function(){
	var start = this._sectionStart + 1,
	    limit = this._index - start;

	if(limit > 6) limit = 6; //the max length of legacy entities is 6

	while(limit >= 2){ //the min length of legacy entities is 2
		var entity = this._buffer.substr(start, limit);

		if(legacyMap.hasOwnProperty(entity)){
			this._emitPartial(legacyMap[entity]);
			this._sectionStart += limit + 1;
			return;
		} else {
			limit--;
		}
	}
};
github thomasjbradley / markbot / app / checks / html / best-practices / htmlparser / Tokenizer.js View on Github external
Tokenizer.prototype._parseLegacyEntity = function(){
  var start = this._sectionStart + 1,
      limit = this._index - start;

  if(limit > 6) limit = 6; //the max length of legacy entities is 6

  while(limit >= 2){ //the min length of legacy entities is 2
    var entity = this._buffer.substr(start, limit);

    if(legacyMap.hasOwnProperty(entity)){
      this._emitPartial(legacyMap[entity]);
      this._sectionStart += limit + 1;
      return;
    } else {
      limit--;
    }
  }
};