mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-08-17 12:12:27 +00:00
Fix links in table of contents caused by variation selector-16 (U+FE0F)
This commit is contained in:
@@ -12,12 +12,12 @@ PHP Curl Class makes it easy to send HTTP requests and integrate with web APIs.
|
||||
|
||||
---
|
||||
|
||||
- [⚙️ Installation](#-installation)
|
||||
- [⚙️ Installation](#%EF%B8%8F-installation)
|
||||
- [📋 Requirements](#-requirements)
|
||||
- [🚀 Quick Start and Examples](#-quick-start-and-examples)
|
||||
- [📖 Available Methods](#-available-methods)
|
||||
- [🔒 Security](#-security)
|
||||
- [🛠️ Troubleshooting](#-troubleshooting)
|
||||
- [🛠️ Troubleshooting](#%EF%B8%8F-troubleshooting)
|
||||
- [🧪 Testing](#-testing)
|
||||
- [🤝 Contributing](#-contributing)
|
||||
|
||||
|
||||
@@ -51,7 +51,19 @@ script=$(cat <<'EOF'
|
||||
preg_match_all('/^### (.*)/m', $data, $matches);
|
||||
$toc = [];
|
||||
foreach ($matches['1'] as $match) {
|
||||
$slug = strtolower(preg_replace('/[^A-Za-z-]/', '', str_replace(' ', '-', $match)));
|
||||
$slug = urlencode(
|
||||
strtolower(
|
||||
str_replace(
|
||||
' ',
|
||||
'-',
|
||||
preg_replace(
|
||||
'/[^A-Za-z\x{FE0F} ]/u',
|
||||
'',
|
||||
$match,
|
||||
),
|
||||
)
|
||||
)
|
||||
);
|
||||
$href = '#' . $slug;
|
||||
$toc[] = '- [' . $match . '](' . $href . ')';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user