8 Commits

Author SHA1 Message Date
Will McGugan
6b0c6e045d tests 2025-08-06 16:30:20 +01:00
Will McGugan
5972df1f4f content simplify 2025-08-06 16:17:39 +01:00
TomJGooding
8431b9c8ec fix(slug): remove all Supplemental Symbols in slug
Fix the `slug` function to remove *all* emojis in the Supplemental
Symbols and Pictographs Unicode block.

I'm not sure why originally only a partial range was removed, but this
change seems to align with GitHub-flavored Markdown.

While this will effectively fix issue #5998, it does not address the
underlying problem where slugs were never designed for widget IDs.
2025-08-05 20:11:21 +01:00
Darren Burns
5966bf3318 Update snapshots (#4788)
* Update snapshots

* Update to use textual-snapshot v1.0.0

* Dont use xdist on CI

* Update pytest-cov to fix warnings

* Remove xdist thing from pythonpackage.yml GitHub workflow
2024-07-25 11:50:54 +01:00
Dave Pearson
70ab4c7763 Add URL quoting as the final act of slugging 2023-09-05 13:51:17 +01:00
Dave Pearson
edc0420a5a Simplify and improve the slugging code
This isn't 100% how GitHub's approach works, but the edge cases I can find
appear to be bugs or issues with how GitHub handle the more interesting
emoji when they appear in headers.

Long story short: they appear to just strip emoji for the most part, but if
an emoji is modified in some interesting way (think shrugging person vs
shrugging light-skinned woman with black hair) it looks like the final
codepoint "leaks" into the slug; nothing about this looks intentional, and
it's such a remote issue that it's hardly worth supporting.
2023-09-05 12:33:13 +01:00
Dave Pearson
80821155a6 Add a test for accents 2023-09-04 16:19:19 +01:00
Dave Pearson
190a57c414 Initial work on figuring out how best to slug like GitHub Markdown
Still some work to do to figure out the rules, but this is a good starting
point.
2023-09-04 15:23:58 +01:00