Skip to content

Commit

Permalink
fix: fix code style problem
Browse files Browse the repository at this point in the history
  • Loading branch information
SamXChen committed Oct 10, 2020
1 parent ba09c7f commit 331386a
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,20 +238,17 @@ const plugin = (options = {}) => {

tokens = tokens.map((token, idx) => {
if (idx === 0 || tokens[idx - 1] === ",") {

let result = token;

const localMatch = /^(\s*):local\s*\((.+?)\)/.exec(token);
const nextLocalMatch = /:local\s*\((.+?)\)/.exec(token);

if (localMatch) {
result = (
result =
localMatch[1] +
exportScopedName(localMatch[2]) +
token.substr(localMatch[0].length)
);
token.substr(localMatch[0].length);
} else if (nextLocalMatch) {

const input = nextLocalMatch.input;
const matchPattern = nextLocalMatch[0];
const matchVal = nextLocalMatch[1];
Expand Down

0 comments on commit 331386a

Please sign in to comment.