diff --git a/README.md b/README.md
index 49296c47..29ca6783 100644
--- a/README.md
+++ b/README.md
@@ -27,6 +27,20 @@ By default every local `
` is required (`require('./image.pn
You can specify which tag-attribute combination should be processed by this loader via the query parameter `attrs`. Pass an array or a space-separated list of `:` combinations. (Default: `attrs=img:src`)
+If you use ``, and lots of them make use of a `custom-src` attribute, you don't have to specify each combination `:`: just specify an empty tag like `attrs=:custom-src` and it will match every element.
+
+```js
+{
+ test: /\.(html)$/,
+ use: {
+ loader: 'html-loader',
+ options: {
+ attrs: [':data-src']
+ }
+ }
+}
+```
+
To completely disable tag-attribute processing (for instance, if you're handling image loading on the client side) you can pass in `attrs=false`.
Examples
diff --git a/index.js b/index.js
index d575e030..ba1049d2 100644
--- a/index.js
+++ b/index.js
@@ -39,7 +39,11 @@ module.exports = function(content) {
}
var root = config.root;
var links = attrParse(content, function(tag, attr) {
- return attributes.indexOf(tag + ":" + attr) >= 0;
+ var item = tag + ":" + attr;
+ var res = attributes.find(function(a) {
+ return item.indexOf(a) >= 0;
+ });
+ return !!res;
});
links.reverse();
var data = {};
diff --git a/test/loaderTest.js b/test/loaderTest.js
index 285fdfd6..2546f443 100644
--- a/test/loaderTest.js
+++ b/test/loaderTest.js
@@ -29,6 +29,13 @@ describe("loader", function() {
'module.exports = "Text