"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "addon/hint/xml-hint.js" between
CodeMirror-5.58.2.tar.gz and CodeMirror-5.58.3.tar.gz

About: CodeMirror is a text editor implemented in JavaScript for the browser and specialized for editing code.

xml-hint.js  (CodeMirror-5.58.2):xml-hint.js  (CodeMirror-5.58.3)
skipping to change at line 104 skipping to change at line 104
if (/['"]/.test(token.string.charAt(len - 1))) { if (/['"]/.test(token.string.charAt(len - 1))) {
quote = token.string.charAt(len - 1); quote = token.string.charAt(len - 1);
prefix = token.string.substr(n, len - 2); prefix = token.string.substr(n, len - 2);
} }
if (n) { // an opening quote if (n) { // an opening quote
var line = cm.getLine(cur.line); var line = cm.getLine(cur.line);
if (line.length > token.end && line.charAt(token.end) == quote) toke n.end++; // include a closing quote if (line.length > token.end && line.charAt(token.end) == quote) toke n.end++; // include a closing quote
} }
replaceToken = true; replaceToken = true;
} }
function returnHintsFromAtValues(atValues) { var returnHintsFromAtValues = function(atValues) {
if (atValues) if (atValues)
for (var i = 0; i < atValues.length; ++i) if (!prefix || matches(atV alues[i], prefix, matchInMiddle)) for (var i = 0; i < atValues.length; ++i) if (!prefix || matches(atV alues[i], prefix, matchInMiddle))
result.push(quote + atValues[i] + quote); result.push(quote + atValues[i] + quote);
return returnHints(); return returnHints();
} };
if (atValues && atValues.then) return atValues.then(returnHintsFromAtVal ues); if (atValues && atValues.then) return atValues.then(returnHintsFromAtVal ues);
return returnHintsFromAtValues(atValues); return returnHintsFromAtValues(atValues);
} else { // An attribute name } else { // An attribute name
if (token.type == "attribute") { if (token.type == "attribute") {
prefix = token.string; prefix = token.string;
replaceToken = true; replaceToken = true;
} }
for (var attr in attrs) if (attrs.hasOwnProperty(attr) && (!prefix || ma tches(attr, prefix, matchInMiddle))) for (var attr in attrs) if (attrs.hasOwnProperty(attr) && (!prefix || ma tches(attr, prefix, matchInMiddle)))
result.push(attr); result.push(attr);
} }
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)