Merge pull request 'Handle paperclip emoji when stripping away heading anchors' (#969) from heading-anchor-paperclip into release

Reviewed-on: https://codeberg.org/readeck/readeck/pulls/969
Reviewed-by: olivier <olivier@noreply.codeberg.org>
This commit is contained in:
olivier
2025-11-27 10:47:46 +01:00
3 changed files with 10 additions and 2 deletions

View File

@@ -94,8 +94,8 @@ func containsSingleIcon(a *html.Node) bool {
firstRune = r
}
switch firstRune {
// Common section character icons, zero-width space for VitePress, chain link emoji
case '#', '¶', '§', '\u200B', 0x1f517:
// Common section character icons, zero-width space for VitePress, chain link emoji, paperclip emoji
case '#', '¶', '§', '\u200B', 0x1f517, 0x1f4ce:
return true
default:
// Font Awesome icons are assigned codepoints in the Unicode "Private Use" category

View File

@@ -78,6 +78,10 @@
<h3><span id="Objection:_Users_won.27t_change"></span><span class="mw-headline" id="Objection:_Users_won&#39;t_change"> Objection: Users won&#39;t change</span></h3>
<p>Paperclip emoji icon:</p>
<h2 id="what-does-urlpattern-do">What does <code>URLPattern()</code> Do? </h2>
<p>Preserve fragment ID:</p>
<h3 data-sourcepos="41:1-41:30" id="how-i-learned-to-love-ruby">

View File

@@ -81,6 +81,10 @@
<h3><span id="Objection:_Users_won.27t_change"></span><span class="mw-headline" id="Objection:_Users_won't_change"><a href="#Objection:_Users_won't_change">🔗</a> Objection: Users won't change</span></h3>
<p>Paperclip emoji icon:</p>
<h2 id="what-does-urlpattern-do">What does <code>URLPattern()</code> Do? <a href="#what-does-urlpattern-do" class="heading-link" data-heading-id="what-does-urlpattern-do" aria-label="Copy link to What does URLPattern() Do?" title="Copy link to this heading">📎</a></h2>
<p>Preserve fragment ID:</p>
<h3 data-sourcepos="41:1-41:30">