Permalink
Browse files

Hotfix logica de reconocimiento parrafo

  • Loading branch information...
MarioFinale committed Feb 18, 2018
1 parent 97fd7c3 commit 5d2b5dce9dab2b841445ab864497f03754a6f939
Showing with 7 additions and 6 deletions.
  1. +7 −5 Bot.vb
  2. +0 −1 MainModule.vb
View
12 Bot.vb
@@ -595,17 +595,19 @@ Namespace WikiBot
Dim signpattern As String = "([0-9]{2}):([0-9]{2}) ([0-9]{2}|[0-9]) ([Z-z]{3}) [0-9]{4} \(UTC\)"
Dim matchc As MatchCollection = Regex.Matches(lastparagraph, signpattern)
If matchc.Count = 0 Then
If matchc.Count = 0 And Not (((lastparagraph(0) = ";"c) Or (lastparagraph(0) = ":"c) Or (lastparagraph(0) = "*"c) Or (lastparagraph(0) = "#"c))) Then
Dim mlines As MatchCollection = Regex.Matches(text, ".+\n")
For i As Integer = mlines.Count - 1 To 0 Step -1
If i = (mlines.Count - 1) Then
If Regex.Match(mlines(i).Value, signpattern).Success Then
lastparagraph = mlines(i).Value
Exit For
If Not (mlines(i).Value(0) = ";"c) Or (mlines(i).Value(0) = ":"c) Or (mlines(i).Value(0) = "*"c) Or (mlines(i).Value(0) = "#"c) Then
If Regex.Match(mlines(i).Value, signpattern).Success Then
lastparagraph = mlines(i).Value
Exit For
End If
End If
Else
If Not (mlines(i).Value(0) = ";"c) Or (mlines(i).Value(0) = ":"c) Then
If Not (mlines(i).Value(0) = ";"c) Or (mlines(i).Value(0) = ":"c) Or (mlines(i).Value(0) = "*"c) Or (mlines(i).Value(0) = "#"c) Then
If Regex.Match(mlines(i).Value, signpattern).Success Then
lastparagraph = mlines(i).Value
Exit For
View
@@ -39,7 +39,6 @@ Module MainModule
ArchiveAllTask.Run()
Do
Dim command As String = Console.ReadLine()
If Not String.IsNullOrWhiteSpace(command) Then

0 comments on commit 5d2b5dc

Please sign in to comment.