exports.SiteMap = SiteMap;
/**
* @see http://www.sitemaps.org/protocol.php
*
* @param docs
* @returns {SiteMap}
*/
function SiteMap(docs){
this.render = function() {
var map = [];
map.push('');
map.push('');
docs.forEach(function(doc){
map.push(' http://docs.angularjs.org/#!/' +
encode(doc.section) + '/' +
encode(doc.id) +
'weekly');
});
map.push('');
map.push('');
return map.join('\n');
};
function encode(text){
return text
.replace(/&/mg, '&')
.replace(//mg, '>')
.replace(/'/mg, ''')
.replace(/"/mg, '"');
}
}
'>g3_v1_3
blob: aaf69cde785752c2e3bace5b63433852e708b718 (
plain)