Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
PublicAndroidApps
Nebulo
Commits
9a74354a
Commit
9a74354a
authored
Nov 21, 2019
by
Daniel Wolf
Browse files
Use the trimmed line on the matchers
parent
3617ba1a
Pipeline
#5874
passed with stage
in 2 minutes and 55 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
app/src/main/java/com/frostnerd/smokescreen/service/RuleImportService.kt
View file @
9a74354a
...
...
@@ -271,9 +271,10 @@ class RuleImportService : IntentService("RuleImportService") {
var
ruleCount
=
0
val
sourceId
=
source
.
id
BufferedReader
(
InputStreamReader
(
stream
)).
useLines
{
lines
->
lines
.
forEach
{
line
->
lines
.
forEach
{
_line
->
val
line
=
_line
.
trim
()
if
(!
isAborted
)
{
if
(
parsers
.
isNotEmpty
()
&&
!
line
.
trim
().
startsWith
(
"#"
)
&&
!
line
.
trim
().
startsWith
(
"!"
)
&&
!
line
.
isBlank
())
{
if
(
parsers
.
isNotEmpty
()
&&
!
line
.
startsWith
(
"#"
)
&&
!
line
.
startsWith
(
"!"
)
&&
!
line
.
isBlank
())
{
lineCount
++
val
iterator
=
parsers
.
iterator
()
for
((
matcher
,
hosts
)
in
iterator
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment