Edit File by line
/home/barbar84/www/wp-inclu.../js/codemirr...
File: csslint.js
} else {
[500] Fix | Delete
acc.push(Matcher.cast(v));
[501] Fix | Delete
}
[502] Fix | Delete
return acc;
[503] Fix | Delete
}, []);
[504] Fix | Delete
[505] Fix | Delete
if (required === true) {
[506] Fix | Delete
required = ms.map(function() {
[507] Fix | Delete
return true;
[508] Fix | Delete
});
[509] Fix | Delete
}
[510] Fix | Delete
[511] Fix | Delete
var result = new Matcher(function(expression) {
[512] Fix | Delete
var seen = [], max = 0, pass = 0;
[513] Fix | Delete
var success = function(matchCount) {
[514] Fix | Delete
if (pass === 0) {
[515] Fix | Delete
max = Math.max(matchCount, max);
[516] Fix | Delete
return matchCount === ms.length;
[517] Fix | Delete
} else {
[518] Fix | Delete
return matchCount === max;
[519] Fix | Delete
}
[520] Fix | Delete
};
[521] Fix | Delete
var tryMatch = function(matchCount) {
[522] Fix | Delete
for (var i = 0; i < ms.length; i++) {
[523] Fix | Delete
if (seen[i]) {
[524] Fix | Delete
continue;
[525] Fix | Delete
}
[526] Fix | Delete
expression.mark();
[527] Fix | Delete
if (ms[i].match(expression)) {
[528] Fix | Delete
seen[i] = true;
[529] Fix | Delete
// Increase matchCount iff this was a required element
[530] Fix | Delete
// (or if all the elements are optional)
[531] Fix | Delete
if (tryMatch(matchCount + ((required === false || required[i]) ? 1 : 0))) {
[532] Fix | Delete
expression.drop();
[533] Fix | Delete
return true;
[534] Fix | Delete
}
[535] Fix | Delete
// Backtrack: try *not* matching using this rule, and
[536] Fix | Delete
// let's see if it leads to a better overall match.
[537] Fix | Delete
expression.restore();
[538] Fix | Delete
seen[i] = false;
[539] Fix | Delete
} else {
[540] Fix | Delete
expression.drop();
[541] Fix | Delete
}
[542] Fix | Delete
}
[543] Fix | Delete
return success(matchCount);
[544] Fix | Delete
};
[545] Fix | Delete
if (!tryMatch(0)) {
[546] Fix | Delete
// Couldn't get a complete match, retrace our steps to make the
[547] Fix | Delete
// match with the maximum # of required elements.
[548] Fix | Delete
pass++;
[549] Fix | Delete
tryMatch(0);
[550] Fix | Delete
}
[551] Fix | Delete
[552] Fix | Delete
if (required === false) {
[553] Fix | Delete
return max > 0;
[554] Fix | Delete
}
[555] Fix | Delete
// Use finer-grained specification of which matchers are required.
[556] Fix | Delete
for (var i = 0; i < ms.length; i++) {
[557] Fix | Delete
if (required[i] && !seen[i]) {
[558] Fix | Delete
return false;
[559] Fix | Delete
}
[560] Fix | Delete
}
[561] Fix | Delete
return true;
[562] Fix | Delete
}, function(prec) {
[563] Fix | Delete
var p = required === false ? Matcher.prec.OROR : Matcher.prec.ANDAND;
[564] Fix | Delete
var s = ms.map(function(m, i) {
[565] Fix | Delete
if (required !== false && !required[i]) {
[566] Fix | Delete
return m.toString(Matcher.prec.MOD) + "?";
[567] Fix | Delete
}
[568] Fix | Delete
return m.toString(p);
[569] Fix | Delete
}).join(required === false ? " || " : " && ");
[570] Fix | Delete
if (prec > p) {
[571] Fix | Delete
s = "[ " + s + " ]";
[572] Fix | Delete
}
[573] Fix | Delete
return s;
[574] Fix | Delete
});
[575] Fix | Delete
result.options = ms;
[576] Fix | Delete
return result;
[577] Fix | Delete
};
[578] Fix | Delete
[579] Fix | Delete
/**
[580] Fix | Delete
* Create a matcher for two or more options, where all options are
[581] Fix | Delete
* mandatory but they may appear in any order.
[582] Fix | Delete
*/
[583] Fix | Delete
Matcher.andand = function() {
[584] Fix | Delete
var args = Array.prototype.slice.call(arguments);
[585] Fix | Delete
args.unshift(true);
[586] Fix | Delete
return Matcher.many.apply(Matcher, args);
[587] Fix | Delete
};
[588] Fix | Delete
[589] Fix | Delete
/**
[590] Fix | Delete
* Create a matcher for two or more options, where options are
[591] Fix | Delete
* optional and may appear in any order, but at least one must be
[592] Fix | Delete
* present.
[593] Fix | Delete
*/
[594] Fix | Delete
Matcher.oror = function() {
[595] Fix | Delete
var args = Array.prototype.slice.call(arguments);
[596] Fix | Delete
args.unshift(false);
[597] Fix | Delete
return Matcher.many.apply(Matcher, args);
[598] Fix | Delete
};
[599] Fix | Delete
[600] Fix | Delete
/** Instance methods on Matchers. */
[601] Fix | Delete
Matcher.prototype = {
[602] Fix | Delete
constructor: Matcher,
[603] Fix | Delete
// These are expected to be overridden in every instance.
[604] Fix | Delete
match: function() { throw new Error("unimplemented"); },
[605] Fix | Delete
toString: function() { throw new Error("unimplemented"); },
[606] Fix | Delete
// This returns a standalone function to do the matching.
[607] Fix | Delete
func: function() { return this.match.bind(this); },
[608] Fix | Delete
// Basic combinators
[609] Fix | Delete
then: function(m) { return Matcher.seq(this, m); },
[610] Fix | Delete
or: function(m) { return Matcher.alt(this, m); },
[611] Fix | Delete
andand: function(m) { return Matcher.many(true, this, m); },
[612] Fix | Delete
oror: function(m) { return Matcher.many(false, this, m); },
[613] Fix | Delete
// Component value multipliers
[614] Fix | Delete
star: function() { return this.braces(0, Infinity, "*"); },
[615] Fix | Delete
plus: function() { return this.braces(1, Infinity, "+"); },
[616] Fix | Delete
question: function() { return this.braces(0, 1, "?"); },
[617] Fix | Delete
hash: function() {
[618] Fix | Delete
return this.braces(1, Infinity, "#", Matcher.cast(","));
[619] Fix | Delete
},
[620] Fix | Delete
braces: function(min, max, marker, optSep) {
[621] Fix | Delete
var m1 = this, m2 = optSep ? optSep.then(this) : this;
[622] Fix | Delete
if (!marker) {
[623] Fix | Delete
marker = "{" + min + "," + max + "}";
[624] Fix | Delete
}
[625] Fix | Delete
return new Matcher(function(expression) {
[626] Fix | Delete
var result = true, i;
[627] Fix | Delete
for (i = 0; i < max; i++) {
[628] Fix | Delete
if (i > 0 && optSep) {
[629] Fix | Delete
result = m2.match(expression);
[630] Fix | Delete
} else {
[631] Fix | Delete
result = m1.match(expression);
[632] Fix | Delete
}
[633] Fix | Delete
if (!result) {
[634] Fix | Delete
break;
[635] Fix | Delete
}
[636] Fix | Delete
}
[637] Fix | Delete
return i >= min;
[638] Fix | Delete
}, function() {
[639] Fix | Delete
return m1.toString(Matcher.prec.MOD) + marker;
[640] Fix | Delete
});
[641] Fix | Delete
}
[642] Fix | Delete
};
[643] Fix | Delete
[644] Fix | Delete
},{"../util/StringReader":24,"../util/SyntaxError":25,"./ValidationTypes":21}],4:[function(require,module,exports){
[645] Fix | Delete
"use strict";
[646] Fix | Delete
[647] Fix | Delete
module.exports = MediaFeature;
[648] Fix | Delete
[649] Fix | Delete
var SyntaxUnit = require("../util/SyntaxUnit");
[650] Fix | Delete
[651] Fix | Delete
var Parser = require("./Parser");
[652] Fix | Delete
[653] Fix | Delete
/**
[654] Fix | Delete
* Represents a media feature, such as max-width:500.
[655] Fix | Delete
* @namespace parserlib.css
[656] Fix | Delete
* @class MediaFeature
[657] Fix | Delete
* @extends parserlib.util.SyntaxUnit
[658] Fix | Delete
* @constructor
[659] Fix | Delete
* @param {SyntaxUnit} name The name of the feature.
[660] Fix | Delete
* @param {SyntaxUnit} value The value of the feature or null if none.
[661] Fix | Delete
*/
[662] Fix | Delete
function MediaFeature(name, value) {
[663] Fix | Delete
[664] Fix | Delete
SyntaxUnit.call(this, "(" + name + (value !== null ? ":" + value : "") + ")", name.startLine, name.startCol, Parser.MEDIA_FEATURE_TYPE);
[665] Fix | Delete
[666] Fix | Delete
/**
[667] Fix | Delete
* The name of the media feature
[668] Fix | Delete
* @type String
[669] Fix | Delete
* @property name
[670] Fix | Delete
*/
[671] Fix | Delete
this.name = name;
[672] Fix | Delete
[673] Fix | Delete
/**
[674] Fix | Delete
* The value for the feature or null if there is none.
[675] Fix | Delete
* @type SyntaxUnit
[676] Fix | Delete
* @property value
[677] Fix | Delete
*/
[678] Fix | Delete
this.value = value;
[679] Fix | Delete
}
[680] Fix | Delete
[681] Fix | Delete
MediaFeature.prototype = new SyntaxUnit();
[682] Fix | Delete
MediaFeature.prototype.constructor = MediaFeature;
[683] Fix | Delete
[684] Fix | Delete
[685] Fix | Delete
},{"../util/SyntaxUnit":26,"./Parser":6}],5:[function(require,module,exports){
[686] Fix | Delete
"use strict";
[687] Fix | Delete
[688] Fix | Delete
module.exports = MediaQuery;
[689] Fix | Delete
[690] Fix | Delete
var SyntaxUnit = require("../util/SyntaxUnit");
[691] Fix | Delete
[692] Fix | Delete
var Parser = require("./Parser");
[693] Fix | Delete
[694] Fix | Delete
/**
[695] Fix | Delete
* Represents an individual media query.
[696] Fix | Delete
* @namespace parserlib.css
[697] Fix | Delete
* @class MediaQuery
[698] Fix | Delete
* @extends parserlib.util.SyntaxUnit
[699] Fix | Delete
* @constructor
[700] Fix | Delete
* @param {String} modifier The modifier "not" or "only" (or null).
[701] Fix | Delete
* @param {String} mediaType The type of media (i.e., "print").
[702] Fix | Delete
* @param {Array} parts Array of selectors parts making up this selector.
[703] Fix | Delete
* @param {int} line The line of text on which the unit resides.
[704] Fix | Delete
* @param {int} col The column of text on which the unit resides.
[705] Fix | Delete
*/
[706] Fix | Delete
function MediaQuery(modifier, mediaType, features, line, col) {
[707] Fix | Delete
[708] Fix | Delete
SyntaxUnit.call(this, (modifier ? modifier + " ": "") + (mediaType ? mediaType : "") + (mediaType && features.length > 0 ? " and " : "") + features.join(" and "), line, col, Parser.MEDIA_QUERY_TYPE);
[709] Fix | Delete
[710] Fix | Delete
/**
[711] Fix | Delete
* The media modifier ("not" or "only")
[712] Fix | Delete
* @type String
[713] Fix | Delete
* @property modifier
[714] Fix | Delete
*/
[715] Fix | Delete
this.modifier = modifier;
[716] Fix | Delete
[717] Fix | Delete
/**
[718] Fix | Delete
* The mediaType (i.e., "print")
[719] Fix | Delete
* @type String
[720] Fix | Delete
* @property mediaType
[721] Fix | Delete
*/
[722] Fix | Delete
this.mediaType = mediaType;
[723] Fix | Delete
[724] Fix | Delete
/**
[725] Fix | Delete
* The parts that make up the selector.
[726] Fix | Delete
* @type Array
[727] Fix | Delete
* @property features
[728] Fix | Delete
*/
[729] Fix | Delete
this.features = features;
[730] Fix | Delete
[731] Fix | Delete
}
[732] Fix | Delete
[733] Fix | Delete
MediaQuery.prototype = new SyntaxUnit();
[734] Fix | Delete
MediaQuery.prototype.constructor = MediaQuery;
[735] Fix | Delete
[736] Fix | Delete
[737] Fix | Delete
},{"../util/SyntaxUnit":26,"./Parser":6}],6:[function(require,module,exports){
[738] Fix | Delete
"use strict";
[739] Fix | Delete
[740] Fix | Delete
module.exports = Parser;
[741] Fix | Delete
[742] Fix | Delete
var EventTarget = require("../util/EventTarget");
[743] Fix | Delete
var SyntaxError = require("../util/SyntaxError");
[744] Fix | Delete
var SyntaxUnit = require("../util/SyntaxUnit");
[745] Fix | Delete
[746] Fix | Delete
var Combinator = require("./Combinator");
[747] Fix | Delete
var MediaFeature = require("./MediaFeature");
[748] Fix | Delete
var MediaQuery = require("./MediaQuery");
[749] Fix | Delete
var PropertyName = require("./PropertyName");
[750] Fix | Delete
var PropertyValue = require("./PropertyValue");
[751] Fix | Delete
var PropertyValuePart = require("./PropertyValuePart");
[752] Fix | Delete
var Selector = require("./Selector");
[753] Fix | Delete
var SelectorPart = require("./SelectorPart");
[754] Fix | Delete
var SelectorSubPart = require("./SelectorSubPart");
[755] Fix | Delete
var TokenStream = require("./TokenStream");
[756] Fix | Delete
var Tokens = require("./Tokens");
[757] Fix | Delete
var Validation = require("./Validation");
[758] Fix | Delete
[759] Fix | Delete
/**
[760] Fix | Delete
* A CSS3 parser.
[761] Fix | Delete
* @namespace parserlib.css
[762] Fix | Delete
* @class Parser
[763] Fix | Delete
* @constructor
[764] Fix | Delete
* @param {Object} options (Optional) Various options for the parser:
[765] Fix | Delete
* starHack (true|false) to allow IE6 star hack as valid,
[766] Fix | Delete
* underscoreHack (true|false) to interpret leading underscores
[767] Fix | Delete
* as IE6-7 targeting for known properties, ieFilters (true|false)
[768] Fix | Delete
* to indicate that IE < 8 filters should be accepted and not throw
[769] Fix | Delete
* syntax errors.
[770] Fix | Delete
*/
[771] Fix | Delete
function Parser(options) {
[772] Fix | Delete
[773] Fix | Delete
//inherit event functionality
[774] Fix | Delete
EventTarget.call(this);
[775] Fix | Delete
[776] Fix | Delete
[777] Fix | Delete
this.options = options || {};
[778] Fix | Delete
[779] Fix | Delete
this._tokenStream = null;
[780] Fix | Delete
}
[781] Fix | Delete
[782] Fix | Delete
//Static constants
[783] Fix | Delete
Parser.DEFAULT_TYPE = 0;
[784] Fix | Delete
Parser.COMBINATOR_TYPE = 1;
[785] Fix | Delete
Parser.MEDIA_FEATURE_TYPE = 2;
[786] Fix | Delete
Parser.MEDIA_QUERY_TYPE = 3;
[787] Fix | Delete
Parser.PROPERTY_NAME_TYPE = 4;
[788] Fix | Delete
Parser.PROPERTY_VALUE_TYPE = 5;
[789] Fix | Delete
Parser.PROPERTY_VALUE_PART_TYPE = 6;
[790] Fix | Delete
Parser.SELECTOR_TYPE = 7;
[791] Fix | Delete
Parser.SELECTOR_PART_TYPE = 8;
[792] Fix | Delete
Parser.SELECTOR_SUB_PART_TYPE = 9;
[793] Fix | Delete
[794] Fix | Delete
Parser.prototype = function() {
[795] Fix | Delete
[796] Fix | Delete
var proto = new EventTarget(), //new prototype
[797] Fix | Delete
prop,
[798] Fix | Delete
additions = {
[799] Fix | Delete
__proto__: null,
[800] Fix | Delete
[801] Fix | Delete
//restore constructor
[802] Fix | Delete
constructor: Parser,
[803] Fix | Delete
[804] Fix | Delete
//instance constants - yuck
[805] Fix | Delete
DEFAULT_TYPE : 0,
[806] Fix | Delete
COMBINATOR_TYPE : 1,
[807] Fix | Delete
MEDIA_FEATURE_TYPE : 2,
[808] Fix | Delete
MEDIA_QUERY_TYPE : 3,
[809] Fix | Delete
PROPERTY_NAME_TYPE : 4,
[810] Fix | Delete
PROPERTY_VALUE_TYPE : 5,
[811] Fix | Delete
PROPERTY_VALUE_PART_TYPE : 6,
[812] Fix | Delete
SELECTOR_TYPE : 7,
[813] Fix | Delete
SELECTOR_PART_TYPE : 8,
[814] Fix | Delete
SELECTOR_SUB_PART_TYPE : 9,
[815] Fix | Delete
[816] Fix | Delete
//-----------------------------------------------------------------
[817] Fix | Delete
// Grammar
[818] Fix | Delete
//-----------------------------------------------------------------
[819] Fix | Delete
[820] Fix | Delete
_stylesheet: function() {
[821] Fix | Delete
[822] Fix | Delete
/*
[823] Fix | Delete
* stylesheet
[824] Fix | Delete
* : [ CHARSET_SYM S* STRING S* ';' ]?
[825] Fix | Delete
* [S|CDO|CDC]* [ import [S|CDO|CDC]* ]*
[826] Fix | Delete
* [ namespace [S|CDO|CDC]* ]*
[827] Fix | Delete
* [ [ ruleset | media | page | font_face | keyframes_rule | supports_rule ] [S|CDO|CDC]* ]*
[828] Fix | Delete
* ;
[829] Fix | Delete
*/
[830] Fix | Delete
[831] Fix | Delete
var tokenStream = this._tokenStream,
[832] Fix | Delete
count,
[833] Fix | Delete
token,
[834] Fix | Delete
tt;
[835] Fix | Delete
[836] Fix | Delete
this.fire("startstylesheet");
[837] Fix | Delete
[838] Fix | Delete
//try to read character set
[839] Fix | Delete
this._charset();
[840] Fix | Delete
[841] Fix | Delete
this._skipCruft();
[842] Fix | Delete
[843] Fix | Delete
//try to read imports - may be more than one
[844] Fix | Delete
while (tokenStream.peek() === Tokens.IMPORT_SYM) {
[845] Fix | Delete
this._import();
[846] Fix | Delete
this._skipCruft();
[847] Fix | Delete
}
[848] Fix | Delete
[849] Fix | Delete
//try to read namespaces - may be more than one
[850] Fix | Delete
while (tokenStream.peek() === Tokens.NAMESPACE_SYM) {
[851] Fix | Delete
this._namespace();
[852] Fix | Delete
this._skipCruft();
[853] Fix | Delete
}
[854] Fix | Delete
[855] Fix | Delete
//get the next token
[856] Fix | Delete
tt = tokenStream.peek();
[857] Fix | Delete
[858] Fix | Delete
//try to read the rest
[859] Fix | Delete
while (tt > Tokens.EOF) {
[860] Fix | Delete
[861] Fix | Delete
try {
[862] Fix | Delete
[863] Fix | Delete
switch (tt) {
[864] Fix | Delete
case Tokens.MEDIA_SYM:
[865] Fix | Delete
this._media();
[866] Fix | Delete
this._skipCruft();
[867] Fix | Delete
break;
[868] Fix | Delete
case Tokens.PAGE_SYM:
[869] Fix | Delete
this._page();
[870] Fix | Delete
this._skipCruft();
[871] Fix | Delete
break;
[872] Fix | Delete
case Tokens.FONT_FACE_SYM:
[873] Fix | Delete
this._font_face();
[874] Fix | Delete
this._skipCruft();
[875] Fix | Delete
break;
[876] Fix | Delete
case Tokens.KEYFRAMES_SYM:
[877] Fix | Delete
this._keyframes();
[878] Fix | Delete
this._skipCruft();
[879] Fix | Delete
break;
[880] Fix | Delete
case Tokens.VIEWPORT_SYM:
[881] Fix | Delete
this._viewport();
[882] Fix | Delete
this._skipCruft();
[883] Fix | Delete
break;
[884] Fix | Delete
case Tokens.DOCUMENT_SYM:
[885] Fix | Delete
this._document();
[886] Fix | Delete
this._skipCruft();
[887] Fix | Delete
break;
[888] Fix | Delete
case Tokens.SUPPORTS_SYM:
[889] Fix | Delete
this._supports();
[890] Fix | Delete
this._skipCruft();
[891] Fix | Delete
break;
[892] Fix | Delete
case Tokens.UNKNOWN_SYM: //unknown @ rule
[893] Fix | Delete
tokenStream.get();
[894] Fix | Delete
if (!this.options.strict) {
[895] Fix | Delete
[896] Fix | Delete
//fire error event
[897] Fix | Delete
this.fire({
[898] Fix | Delete
type: "error",
[899] Fix | Delete
error: null,
[900] Fix | Delete
message: "Unknown @ rule: " + tokenStream.LT(0).value + ".",
[901] Fix | Delete
line: tokenStream.LT(0).startLine,
[902] Fix | Delete
col: tokenStream.LT(0).startCol
[903] Fix | Delete
});
[904] Fix | Delete
[905] Fix | Delete
//skip braces
[906] Fix | Delete
count=0;
[907] Fix | Delete
while (tokenStream.advance([Tokens.LBRACE, Tokens.RBRACE]) === Tokens.LBRACE) {
[908] Fix | Delete
count++; //keep track of nesting depth
[909] Fix | Delete
}
[910] Fix | Delete
[911] Fix | Delete
while (count) {
[912] Fix | Delete
tokenStream.advance([Tokens.RBRACE]);
[913] Fix | Delete
count--;
[914] Fix | Delete
}
[915] Fix | Delete
[916] Fix | Delete
} else {
[917] Fix | Delete
//not a syntax error, rethrow it
[918] Fix | Delete
throw new SyntaxError("Unknown @ rule.", tokenStream.LT(0).startLine, tokenStream.LT(0).startCol);
[919] Fix | Delete
}
[920] Fix | Delete
break;
[921] Fix | Delete
case Tokens.S:
[922] Fix | Delete
this._readWhitespace();
[923] Fix | Delete
break;
[924] Fix | Delete
default:
[925] Fix | Delete
if (!this._ruleset()) {
[926] Fix | Delete
[927] Fix | Delete
//error handling for known issues
[928] Fix | Delete
switch (tt) {
[929] Fix | Delete
case Tokens.CHARSET_SYM:
[930] Fix | Delete
token = tokenStream.LT(1);
[931] Fix | Delete
this._charset(false);
[932] Fix | Delete
throw new SyntaxError("@charset not allowed here.", token.startLine, token.startCol);
[933] Fix | Delete
case Tokens.IMPORT_SYM:
[934] Fix | Delete
token = tokenStream.LT(1);
[935] Fix | Delete
this._import(false);
[936] Fix | Delete
throw new SyntaxError("@import not allowed here.", token.startLine, token.startCol);
[937] Fix | Delete
case Tokens.NAMESPACE_SYM:
[938] Fix | Delete
token = tokenStream.LT(1);
[939] Fix | Delete
this._namespace(false);
[940] Fix | Delete
throw new SyntaxError("@namespace not allowed here.", token.startLine, token.startCol);
[941] Fix | Delete
default:
[942] Fix | Delete
tokenStream.get(); //get the last token
[943] Fix | Delete
this._unexpectedToken(tokenStream.token());
[944] Fix | Delete
}
[945] Fix | Delete
[946] Fix | Delete
}
[947] Fix | Delete
}
[948] Fix | Delete
} catch (ex) {
[949] Fix | Delete
if (ex instanceof SyntaxError && !this.options.strict) {
[950] Fix | Delete
this.fire({
[951] Fix | Delete
type: "error",
[952] Fix | Delete
error: ex,
[953] Fix | Delete
message: ex.message,
[954] Fix | Delete
line: ex.line,
[955] Fix | Delete
col: ex.col
[956] Fix | Delete
});
[957] Fix | Delete
} else {
[958] Fix | Delete
throw ex;
[959] Fix | Delete
}
[960] Fix | Delete
}
[961] Fix | Delete
[962] Fix | Delete
tt = tokenStream.peek();
[963] Fix | Delete
}
[964] Fix | Delete
[965] Fix | Delete
if (tt !== Tokens.EOF) {
[966] Fix | Delete
this._unexpectedToken(tokenStream.token());
[967] Fix | Delete
}
[968] Fix | Delete
[969] Fix | Delete
this.fire("endstylesheet");
[970] Fix | Delete
},
[971] Fix | Delete
[972] Fix | Delete
_charset: function(emit) {
[973] Fix | Delete
var tokenStream = this._tokenStream,
[974] Fix | Delete
charset,
[975] Fix | Delete
token,
[976] Fix | Delete
line,
[977] Fix | Delete
col;
[978] Fix | Delete
[979] Fix | Delete
if (tokenStream.match(Tokens.CHARSET_SYM)) {
[980] Fix | Delete
line = tokenStream.token().startLine;
[981] Fix | Delete
col = tokenStream.token().startCol;
[982] Fix | Delete
[983] Fix | Delete
this._readWhitespace();
[984] Fix | Delete
tokenStream.mustMatch(Tokens.STRING);
[985] Fix | Delete
[986] Fix | Delete
token = tokenStream.token();
[987] Fix | Delete
charset = token.value;
[988] Fix | Delete
[989] Fix | Delete
this._readWhitespace();
[990] Fix | Delete
tokenStream.mustMatch(Tokens.SEMICOLON);
[991] Fix | Delete
[992] Fix | Delete
if (emit !== false) {
[993] Fix | Delete
this.fire({
[994] Fix | Delete
type: "charset",
[995] Fix | Delete
charset:charset,
[996] Fix | Delete
line: line,
[997] Fix | Delete
col: col
[998] Fix | Delete
});
[999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function