mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-09-15 12:56:40 +00:00
Attempt to fix links in the table of contents
This commit is contained in:
@@ -12,14 +12,14 @@ PHP Curl Class makes it easy to send HTTP requests and integrate with web APIs.
|
||||
|
||||
---
|
||||
|
||||
- [⚙️ Installation](#⚙️-installation)
|
||||
- [📋 Requirements](#📋-requirements)
|
||||
- [🚀 Quick Start and Examples](#🚀-quick-start-and-examples)
|
||||
- [📖 Available Methods](#📖-available-methods)
|
||||
- [🔒 Security](#🔒-security)
|
||||
- [🛠️ Troubleshooting](#🛠️-troubleshooting)
|
||||
- [🧪 Testing](#🧪-testing)
|
||||
- [🤝 Contributing](#🤝-contributing)
|
||||
- [⚙️ Installation](#-installation)
|
||||
- [📋 Requirements](#-requirements)
|
||||
- [🚀 Quick Start and Examples](#-quick-start-and-examples)
|
||||
- [📖 Available Methods](#-available-methods)
|
||||
- [🔒 Security](#-security)
|
||||
- [🛠️ Troubleshooting](#-troubleshooting)
|
||||
- [🧪 Testing](#-testing)
|
||||
- [🤝 Contributing](#-contributing)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -51,7 +51,8 @@ script=$(cat <<'EOF'
|
||||
preg_match_all('/^### (.*)/m', $data, $matches);
|
||||
$toc = [];
|
||||
foreach ($matches['1'] as $match) {
|
||||
$href = '#' . str_replace(' ', '-', strtolower($match));
|
||||
$slug = strtolower(preg_replace('/[^A-Za-z-]/', '', str_replace(' ', '-', $match)));
|
||||
$href = '#' . $slug;
|
||||
$toc[] = '- [' . $match . '](' . $href . ')';
|
||||
}
|
||||
$toc = implode("\n", $toc);
|
||||
|
||||
Reference in New Issue
Block a user