Skip to content
This repository has been archived by the owner on May 24, 2019. It is now read-only.

Commit

Permalink
Minor var renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
leebyron committed Jan 27, 2017
1 parent 419c587 commit 9d79769
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ function removeNode(context, node) {
var length = removedNodes.length;
var index = length;

// Check for line's trailing space to be removed.
// Check for line's leading and trailing space to be removed.
var spaceNode = context.pretty ? getLeadingSpaceNode(context, node) : null;
var lineNode = context.pretty ? getTrailingLineNode(context, node) : null;

Expand Down Expand Up @@ -253,8 +253,8 @@ function removeNode(context, node) {
return false;
}

function getLeadingSpaceNode(state, node) {
var source = state.source;
function getLeadingSpaceNode(context, node) {
var source = context.source;
var end = node.start;
var start = end;
while (source[start - 1] === ' ' || source[start - 1] === '\t') {
Expand All @@ -269,8 +269,8 @@ function getLeadingSpaceNode(state, node) {
}
}

function getTrailingLineNode(state, node) {
var source = state.source;
function getTrailingLineNode(context, node) {
var source = context.source;
var start = node.end;
var end = start;
while (source[end] === ' ' || source[end] === '\t') {
Expand Down

0 comments on commit 9d79769

Please sign in to comment.