mirror of
https://github.com/less/less.js.git
synced 2026-02-07 21:45:08 -05:00
Merge pull request #2315 from guybedford/master
Support non-JSON script attributes
This commit is contained in:
@@ -13,7 +13,10 @@ module.exports = {
|
||||
if (opt === "env" || opt === "dumpLineNumbers" || opt === "rootpath" || opt === "errorReporting") {
|
||||
options[opt] = tag.dataset[opt];
|
||||
} else {
|
||||
options[opt] = JSON.parse(tag.dataset[opt]);
|
||||
try {
|
||||
options[opt] = JSON.parse(tag.dataset[opt]);
|
||||
}
|
||||
catch(_) {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user