Skip to content

Commit

Permalink
1.1.3.9 Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Taicanium committed Mar 25, 2024
1 parent 7a51607 commit 60ccce6
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 12 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 1.1.3.9 - 25/03/2024
- Removing leftover BBCode tags after we're done translating to HTML has been massively optimized. When I say massive, I mean a literal 250% speedup in pessimistic cases. I'm ashamed of myself for not doing this sooner.
- Private channel logs are now formatted with their IDX name (if it exists) followed by the user's supplied file name in parentheses.

# 1.1.3.8 - 22/03/2024
- Unrecognized BBCode tags are no longer erased in HTML output. Jokes such as \[REDACTED\] can now be preserved.
- Small optimizations in repetitive code sequences that should lead to a token speedup when translating to HTML.
Expand Down
2 changes: 1 addition & 1 deletion FLogS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<UseWPF>true</UseWPF>
<SignAssembly>False</SignAssembly>
<Title>FLogS</Title>
<Version>1.1.3.8</Version>
<Version>1.1.3.9</Version>
<IncludeSymbols>True</IncludeSymbols>
<ErrorReport>none</ErrorReport>
<UseWindowsForms>True</UseWindowsForms>
Expand Down
8 changes: 4 additions & 4 deletions MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
<ProgressBar x:Name="FileProgress" Width="600" Height="25" HorizontalAlignment="Center" Minimum="0" Maximum="100"/>
</StackPanel>
</Grid>
<Label x:Name="FileVersionNumber" Content="FLogS — Version 1.1.3.8 © Taica, 2024" HorizontalAlignment="Right" FontStyle="Italic" Margin="10,30" FontWeight="Thin"/>
<Label x:Name="FileVersionNumber" Content="FLogS — Version 1.1.3.9 © Taica, 2024" HorizontalAlignment="Right" FontStyle="Italic" Margin="10,30" FontWeight="Thin"/>
</StackPanel>
</Grid>
</Grid>
Expand Down Expand Up @@ -184,7 +184,7 @@
<ProgressBar x:Name="DirectoryProgress" Width="600" Height="25" HorizontalAlignment="Center" Minimum="0" Maximum="100"/>
</StackPanel>
</Grid>
<Label x:Name="DirectoryVersionNumber" Content="FLogS — Version 1.1.3.8 © Taica, 2024" HorizontalAlignment="Right" FontStyle="Italic" Margin="10,30" FontWeight="Thin"/>
<Label x:Name="DirectoryVersionNumber" Content="FLogS — Version 1.1.3.9 © Taica, 2024" HorizontalAlignment="Right" FontStyle="Italic" Margin="10,30" FontWeight="Thin"/>
</StackPanel>
</Grid>
</Grid>
Expand Down Expand Up @@ -279,7 +279,7 @@
<ProgressBar x:Name="PhraseProgress" Width="600" Height="25" HorizontalAlignment="Center" Minimum="0" Maximum="100"/>
</StackPanel>
</Grid>
<Label x:Name="PhraseVersionNumber" Content="FLogS — Version 1.1.3.8 © Taica, 2024" HorizontalAlignment="Right" FontStyle="Italic" Margin="10,30" FontWeight="Thin"/>
<Label x:Name="PhraseVersionNumber" Content="FLogS — Version 1.1.3.9 © Taica, 2024" HorizontalAlignment="Right" FontStyle="Italic" Margin="10,30" FontWeight="Thin"/>
</StackPanel>
</Grid>
</Grid>
Expand Down Expand Up @@ -335,7 +335,7 @@
</Grid>
<Grid Grid.Row="1" Grid.Column="1" VerticalAlignment="Bottom" Margin="2,2">
<StackPanel Background="LightGray" Margin="2,2">
<Label x:Name="HelpVersionNumber" Content="FLogS — Version 1.1.3.8 © Taica, 2024" HorizontalAlignment="Right" FontStyle="Italic" Margin="10,3" FontWeight="Thin"/>
<Label x:Name="HelpVersionNumber" Content="FLogS — Version 1.1.3.9 © Taica, 2024" HorizontalAlignment="Right" FontStyle="Italic" Margin="10,3" FontWeight="Thin"/>
</StackPanel>
</Grid>
</Grid>
Expand Down
10 changes: 5 additions & 5 deletions MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -266,13 +266,13 @@ private void Hyperlink_RequestNavigate(object sender, System.Windows.Navigation.

private void MainGrid_Loaded(object? sender, RoutedEventArgs e)
{
try
{
overrideFormat = false;
overrideFormat = false;

if (File.Exists(Common.errorFile))
File.Delete(Common.errorFile);
if (File.Exists(Common.errorFile))
File.Delete(Common.errorFile);

try
{
if (ShouldSystemUseDarkMode())
ThemeSelector_Click(sender, e);
}
Expand Down
8 changes: 6 additions & 2 deletions MessagePool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,11 @@ private static bool TranslateMessage(FileStream srcFS, StreamWriter dstFS)
return written;

srcFS.Seek(-6, SeekOrigin.Current);

// Our verification of the next message is rudimentary. We only validate whether the byte occupying the space where a delimiter SHOULD be COULD in fact be a delimiter.
// Tying the presence of a message to the timestamp is less reliable, since we can't assume that the timestamp is intact and well-ordered.
// In practice, I validated 2.2 million messages across ~250 channel logs, and the occurrence of failed delimiter checks, or issues arising thereof, was 0.
// That's unfair, however, because I also know *most* of my logs to be wholly uncorrupted; further testing is necessary with logs that are less intact.
if (nextByte < 7)
{
discrepancy = (int)srcFS.Position - (int)lastPosition;
Expand Down Expand Up @@ -1000,8 +1005,7 @@ bool AdjustHistory(int index)
}

// Finish things off by removing the BBCode tags, leaving only our fresh HTML behind.
messageOut = Regex.Replace(messageOut, @"\[/*\p{L}+=+[^\p{Co}\]]*\]", string.Empty);
messageOut = Regex.Replace(messageOut, @"\[/*\p{L}+\]", string.Empty);
messageOut = Regex.Replace(messageOut, @"\[/*(\p{L}+)(?:=+([^\p{Co}\]]*))*?\]", string.Empty);

return messageOut;
}
Expand Down

0 comments on commit 60ccce6

Please sign in to comment.