Skip to content

Commit

Permalink
Changed not to use Array#slice()
Browse files Browse the repository at this point in the history
  • Loading branch information
segayuu committed Oct 24, 2018
1 parent 77c57dc commit e4fba52
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lib/plugins/tag/img.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,10 @@ module.exports = ctx => {
let src;

// Find image URL and class name
for (let i = 0, len = args.length; i < len; i++) {
const item = args[i];

while (args.length > 0) {
const item = args.shift();
if (rUrl.test(item) || item[0] === '/') {
src = makeUrl(item);

// Delete image URL and class name from arguments
args = args.slice(i + 1);
break;
} else {
classes.push(item);
Expand Down

0 comments on commit e4fba52

Please sign in to comment.