mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-10-08 04:55:22 +00:00
Add flair
This commit is contained in:
@@ -4,11 +4,11 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
cd "${SCRIPT_DIR}/.."
|
||||
|
||||
before=$(head -n $(
|
||||
grep --context="0" --line-number --max-count="1" "### Available Methods" "README.md" |
|
||||
grep --context="0" --line-number --max-count="1" "### 📖 Available Methods" "README.md" |
|
||||
perl -pe 's/^(\d+):.*/\1/') "README.md")
|
||||
|
||||
after=$(tail -n +$(
|
||||
grep --context="0" --line-number --max-count="1" "### Security" "README.md" |
|
||||
grep --context="0" --line-number --max-count="1" "### 🔒 Security" "README.md" |
|
||||
perl -pe 's/^(\d+):.*/\1/') "README.md")
|
||||
|
||||
echo "${before}" > "README.md"
|
||||
@@ -48,7 +48,7 @@ echo "${after}" >> "README.md"
|
||||
# Update table of contents.
|
||||
script=$(cat <<'EOF'
|
||||
$data = file_get_contents('README.md');
|
||||
preg_match_all('/^### ([\w ]+)/m', $data, $matches);
|
||||
preg_match_all('/^### (.*)/m', $data, $matches);
|
||||
$toc = [];
|
||||
foreach ($matches['1'] as $match) {
|
||||
$href = '#' . str_replace(' ', '-', strtolower($match));
|
||||
|
||||
Reference in New Issue
Block a user