"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "packages/less/src/less-browser/utils.js" between
less.js-4.1.2.tar.gz and less.js-4.1.3.tar.gz

About: Less.js (Leaner CSS) is a CSS preprocessor (extension language) adding features that allow variables, mixins, functions and many other techniques that allow you to make CSS that is more maintainable, themable and extendable.

utils.js  (less.js-4.1.2):utils.js  (less.js-4.1.3)
skipping to change at line 12 skipping to change at line 12
export function extractId(href) { export function extractId(href) {
return href.replace(/^[a-z-]+:\/+?[^\/]+/, '') // Remove protocol & domain return href.replace(/^[a-z-]+:\/+?[^\/]+/, '') // Remove protocol & domain
.replace(/[\?\&]livereload=\w+/, '') // Remove LiveReload cachebu ster .replace(/[\?\&]livereload=\w+/, '') // Remove LiveReload cachebu ster
.replace(/^\//, '') // Remove root / .replace(/^\//, '') // Remove root /
.replace(/\.[a-zA-Z]+$/, '') // Remove simple extension .replace(/\.[a-zA-Z]+$/, '') // Remove simple extension
.replace(/[^\.\w-]+/g, '-') // Replace illegal character s .replace(/[^\.\w-]+/g, '-') // Replace illegal character s
.replace(/\./g, ':'); // Replace dots with colons( for valid id) .replace(/\./g, ':'); // Replace dots with colons( for valid id)
} }
export function addDataAttr(options, tag) { export function addDataAttr(options, tag) {
if (!tag) {return;} // in case of tag is null or undefined
for (const opt in tag.dataset) { for (const opt in tag.dataset) {
if (tag.dataset.hasOwnProperty(opt)) { if (tag.dataset.hasOwnProperty(opt)) {
if (opt === 'env' || opt === 'dumpLineNumbers' || opt === 'rootpath' || opt === 'errorReporting') { if (opt === 'env' || opt === 'dumpLineNumbers' || opt === 'rootpath' || opt === 'errorReporting') {
options[opt] = tag.dataset[opt]; options[opt] = tag.dataset[opt];
} else { } else {
try { try {
options[opt] = JSON.parse(tag.dataset[opt]); options[opt] = JSON.parse(tag.dataset[opt]);
} }
catch (_) {} catch (_) {}
} }
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added

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