diff --git a/Doxyfile b/Doxyfile index 1f2cfbe..eb53d4e 100644 --- a/Doxyfile +++ b/Doxyfile @@ -14,7 +14,6 @@ INPUT = README.md src/ FILE_PATTERNS = *.php RECURSIVE = YES USE_MDFILE_AS_MAINPAGE = README.md -FILTER_PATTERNS = *md=build/doxygen_escape.sh HTML_DYNAMIC_SECTIONS = YES GENERATE_TREEVIEW = YES TREEVIEW_WIDTH = 250 diff --git a/HISTORY.md b/HISTORY.md new file mode 100644 index 0000000..0593e51 --- /dev/null +++ b/HISTORY.md @@ -0,0 +1,13 @@ +## v2.0.0 + +* [BREAKING CHANGE] Raise claimed PHP need from 7.0+ to 7.4+ (James D. Forrester) +* [BREAKING CHANGE] Drop HHVM support (James D. Forrester) +* Fix for numeric strings (Miguel Xavier Penha Neto) [T301632](https://phabricator.wikimedia.org/T301632) + +## v1.0.1 + +* docs: Fix `
` compat with Doxygen markdown (Timo Tijhof)
+
+## v1.0.0
+
+* Initial commit (Ori Livneh)
diff --git a/NOTICE b/NOTICE
index 344d627..cc7ecfc 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,2 +1,15 @@
-AhoCorasick PHP Library
+wikimedia/aho-corasick. https://gerrit.wikimedia.org/g/AhoCorasick
+
 Copyright 2015 Ori Livneh 
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
diff --git a/README.md b/README.md
index a69e2b7..7caf830 100644
--- a/README.md
+++ b/README.md
@@ -9,7 +9,7 @@ search keywords.
 
 Here is how you use it:
 
-
+```php
 use AhoCorasick\MultiStringMatcher;
 
 $keywords = new MultiStringMatcher( array( 'ore', 'hell' ) );
@@ -19,7 +19,7 @@ $keywords->searchIn( 'She sells sea shells by the sea shore.' );
 
 $keywords->searchIn( 'Say hello to more text. MultiStringMatcher objects are reusable!' );
 // Result: array( array( 4, 'hell' ), array( 14, 'ore' ) )
-
+``` Features @@ -32,12 +32,19 @@ constructed, the machine can locate all occurences of all search keywords in any body of text in a single pass, making exactly one state transition per input character. +The algorithm originates from ["Efficient string matching: an aid to bibliographic search"][paper] (CACM, Volume 18, Issue 6, June 1975) by Alfred V. Aho and Margaret J. Corasick. + +See also the definition and reference implementation on [nist.gov][dads]. + + +[paper]: https://doi.org/10.1145/360825.36085 +[dads]: http://xlinux.nist.gov/dads/HTML/ahoCorasick.html Contribute ---------- -- Issue tracker: -- Source code: https://github.com/wikimedia/AhoCorasick +- Issue tracker: https://phabricator.wikimedia.org/tag/ahocorasick/ +- Source code: https://gerrit.wikimedia.org/g/AhoCorasick Support diff --git a/build/doxygen_escape.sh b/build/doxygen_escape.sh deleted file mode 100755 index 414d62c..0000000 --- a/build/doxygen_escape.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -# Escape Doxygen commands, used for Markdown files (T185728) -cat $1 | sed 's/\\/\\\\/g' - diff --git a/composer.json b/composer.json index 532dc8a..2c70b57 100644 --- a/composer.json +++ b/composer.json @@ -42,6 +42,7 @@ "@phpcs", "minus-x check ." ], + "changelog": "git log --format='* %s (%aN)' --no-merges --reverse $(git describe --tags --abbrev=0 HEAD)...HEAD | sort | grep -vE '^\\* (build|docs?|tests?):'", "cover": "phpunit --coverage-html coverage", "fix": [ "minus-x fix .", diff --git a/src/MultiStringMatcher.php b/src/MultiStringMatcher.php index cdc9c89..a34fa6e 100644 --- a/src/MultiStringMatcher.php +++ b/src/MultiStringMatcher.php @@ -1,16 +1,6 @@ + * Copyright 2015 Ori Livneh * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -46,7 +36,7 @@ * Alfred V. Aho and Margaret J. Corasick, "Efficient string matching: * an aid to bibliographic search", CACM, 18(6):333-340, June 1975. * - * @link http://xlinux.nist.gov/dads//HTML/ahoCorasick.html + * @link http://xlinux.nist.gov/dads/HTML/ahoCorasick.html */ class MultiStringMatcher { diff --git a/src/MultiStringReplacer.php b/src/MultiStringReplacer.php index b822a8e..bf2d322 100644 --- a/src/MultiStringReplacer.php +++ b/src/MultiStringReplacer.php @@ -1,16 +1,6 @@ + * Copyright 2015 Ori Livneh * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,8 +21,7 @@ namespace AhoCorasick; /** - * This class extends MultiStringMatcher, adding search and replace - * functionality. + * Search and replace functionality. */ class MultiStringReplacer extends MultiStringMatcher {