1
0
mirror of https://codeberg.org/fediverse/fep.git synced 2026-08-05 19:55:46 +00:00

FEP-eb48: Hashtags (#371)

Standardized method for identifying and displaying hashtags in posts across the Fediverse.

Reviewed-on: https://codeberg.org/fediverse/fep/pulls/371
Co-authored-by: AvidSeeker <avidseeker7@protonmail.com>
Co-committed-by: AvidSeeker <avidseeker7@protonmail.com>
This commit is contained in:
AvidSeeker
2024-07-18 17:15:48 +00:00
committed by silverpill
parent 62cd791564
commit d2b83199bd
+58
View File
@@ -0,0 +1,58 @@
---
slug: "eb48"
title: Hashtags
dateReceived: 2024-07-16
discussionsTo: 'https://socialhub.activitypub.rocks/t/4369'
title: Timeline Preferences
authors: AvidSeeker <avidseeker7@protonmail.com>
status: DRAFT
---
# FEP-eb48: Hashtags
## Summary
This proposal introduces a standardized method for identifying and displaying
hashtags in posts across the Fediverse. The rules define what constitutes a
hashtag and how it should be parsed and displayed, ensuring consistency and
predictability across different platforms and clients.
## Hashtag Rules
A string is considered a hashtag if it meets the following criteria:
1. It starts with the `#` symbol.
2. It is followed by one or more alphanumeric characters (letters A-Z, a-z, or digits 0-9).
3. It may include underscores (`_`) but must not include any other special characters, spaces, or punctuation within the hashtag itself.
## Examples
The following examples illustrate how hashtags should be identified and
highlighted:
- `#hashtag`
- "`#hashtag`"
- " `#hashtag`"
- (`#hashtag`/#hashtag)
- ( `#hashtag`/#hashtag)
- ( `#hashtag` /#hashtag)
- ( `#hashtag` / `#hashtag`)
- -`#hashtag`
- \_`#hashtag`
- !`#hashtag`
- ?`#hashtag`
- @`#hashtag`
- ;`#hashtag`
- ,`#hashtag`
- .'`#hashtag`
- [`#hashtag`
- &`#hashtag`
- ^`#hashtag`
## Copyright
CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
To the extent possible under law, the authors of this Fediverse Enhancement
Proposal have waived all copyright and related or neighboring rights to this
work.