Skip to content

Commit e28e2af

Browse files
committed
Rename logger to result
1 parent ce7b22b commit e28e2af

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ var path = require('path');
33
var postcss = require('postcss');
44

55
var defaultPattern = 'Regexp matched with %s on line %l';
6-
var logger;
6+
var postcssResult;
77

88
module.exports = postcss.plugin('postcss-regexp', function(options) {
99
return function(css, result) {
10-
logger = result;
10+
postcssResult = result;
1111
if (!options.regexp) {
1212
throwOptionsError();
1313
return;
@@ -22,7 +22,7 @@ module.exports = postcss.plugin('postcss-regexp', function(options) {
2222
});
2323

2424
function throwOptionsError(){
25-
logger.messages.push({
25+
postcssResult.messages.push({
2626
type: 'error',
2727
plugin: 'postcss-regexp',
2828
text: 'No regexp provided'
@@ -36,7 +36,7 @@ function processDecl(decl, rule) {
3636
var message = pattern
3737
.replace('%s', value)
3838
.replace('%l', decl.source.start.line);
39-
logger.warn(message);
39+
postcssResult.warn(message);
4040
}
4141

4242

0 commit comments

Comments
 (0)