Skip to content

Commit

Permalink
Release version 2.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
0xC0000054 committed Sep 4, 2022
1 parent 6f93fd7 commit 7b6066d
Show file tree
Hide file tree
Showing 299 changed files with 2,026 additions and 3,679 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## v2.3.0 - 2022-09-03

### Added

* A `Strict` property to the `HeifDecodingOptions` class.
Expand All @@ -21,6 +23,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* The libheif initialization and cleanup methods will be called when creating the `HeifContext`.
* This applies to libheif version 1.13.0 and later, it will be treated as a no-op on older versions.

### Fixed

* Various issues with the documentation.

## v2.2.0 - 2022-02-22

### Added
Expand Down
33 changes: 18 additions & 15 deletions docs/API/SearchHelp.aspx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
// System : Sandcastle Help File Builder
// File : SearchHelp.aspx
// Author : Eric Woodruff ([email protected])
// Updated : 05/15/2014
// Note : Copyright 2007-2015, Eric Woodruff, All rights reserved
// Updated : 08/13/2022
// Note : Copyright 2007-2022, Eric Woodruff, All rights reserved
//
// This file contains the code used to search for keywords within the help topics using the full-text index
// files created by the help file builder.
Expand Down Expand Up @@ -119,7 +119,7 @@ private List<string> ParseKeywords(string keywords)
{
checkWord = word.ToLower(CultureInfo.InvariantCulture);
if(checkWord.Length > 2 && !Char.IsDigit(checkWord[0]) && !keywordList.Contains(checkWord))
if(checkWord.Length >= 2 && !Char.IsDigit(checkWord[0]) && !keywordList.Contains(checkWord))
keywordList.Add(checkWord);
}
Expand All @@ -140,7 +140,8 @@ private string Search(List<string> keywords, List<string> fileInfo,
StringBuilder sb = new StringBuilder(10240);
Dictionary<string, List<long>> matches = new Dictionary<string, List<long>>();
List<long> occurrences;
List<int> matchingFileIndices = new List<int>(), occurrenceIndices = new List<int>();
HashSet<int> matchingFileIndices = new HashSet<int>();
List<int> occurrenceIndices = new List<int>();
List<Ranking> rankings = new List<Ranking>();
string filename, title;
Expand All @@ -150,7 +151,13 @@ private string Search(List<string> keywords, List<string> fileInfo,
foreach(string word in keywords)
{
if(!wordDictionary.TryGetValue(word, out occurrences))
occurrences = new List<long>();
foreach(KeyValuePair<string, List<long>> kv in wordDictionary)
if(kv.Key.Contains(word))
occurrences.AddRange(kv.Value);
if(occurrences.Count == 0)
return "<strong>Nothing found</strong>";
matches.Add(word, occurrences);
Expand All @@ -163,18 +170,14 @@ private string Search(List<string> keywords, List<string> fileInfo,
if(isFirst)
{
isFirst = false;
matchingFileIndices.AddRange(occurrenceIndices);
matchingFileIndices.UnionWith(occurrenceIndices);
}
else
{
// After the first match, remove files that do not appear for
// all found keywords.
for(idx = 0; idx < matchingFileIndices.Count; idx++)
if(!occurrenceIndices.Contains(matchingFileIndices[idx]))
{
matchingFileIndices.RemoveAt(idx);
idx--;
}
// After the first match, remove files that do not appear for all found keywords
foreach(int i in matchingFileIndices.ToArray())
if(!occurrenceIndices.Contains(i))
matchingFileIndices.Remove(i);
}
}
Expand Down Expand Up @@ -217,7 +220,7 @@ private string Search(List<string> keywords, List<string> fileInfo,
});
// Format the file list and return the results
sb.Append("<ol>");
sb.Append("<ol>");
foreach(Ranking r in rankings)
sb.AppendFormat("<li><a href=\"{0}\" target=\"_blank\">{1}</a></li>", r.Filename, r.PageTitle);
Expand Down
2 changes: 1 addition & 1 deletion docs/API/SearchHelp.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function ParseKeywords($keywords)
{
$checkWord = strtolower($word);
$first = substr($checkWord, 0, 1);
if(strlen($checkWord) > 2 && !ctype_digit($first) && !in_array($checkWord, $keywordList))
if(strlen($checkWord) >= 2 && !ctype_digit($first) && !in_array($checkWord, $keywordList))
{
array_push($keywordList, $checkWord);
}
Expand Down
1 change: 1 addition & 0 deletions docs/API/Web.Config
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<add namespace="System.Collections.Generic"/>
<add namespace="System.Globalization"/>
<add namespace="System.IO"/>
<add namespace="System.Linq"/>
<add namespace="System.Text"/>
<add namespace="System.Text.RegularExpressions"/>
<add namespace="System.Web"/>
Expand Down
Loading

0 comments on commit 7b6066d

Please sign in to comment.