Skip to content

fix: removeHost only splice changed lines#3

Open
Mario-F wants to merge 1 commit into
maixuanhan:masterfrom
Mario-F:master
Open

fix: removeHost only splice changed lines#3
Mario-F wants to merge 1 commit into
maixuanhan:masterfrom
Mario-F:master

Conversation

@Mario-F

@Mario-F Mario-F commented Mar 21, 2021

Copy link
Copy Markdown

Fixes a problem on removeHost all non token lines like comments or formatting newlines get lost

Fixes a problem on removeHost all non token lines like comments or formatting newlines get lost
Comment thread src/SimpleHosts.ts
}
}
if (tokens.length < 2) {
if (changed && tokens.length < 2) {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can a single-token lines be valid in a hosts file?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes as a comment or blank line

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants