0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-08 17:53:55 +08:00
discourse/migrations/tooling/lib
Gerhard Schlager 3bb300157c MT: Convert custom emoji into placeholder embeds
A post's `:name:` shortcode should become an emoji embed only when it
names one of the source's own custom emoji — standard shortcodes have to
stay plain text. So the Posts step loads the custom emoji names once
before forking (like it already does for group names) and hands them to
the extractor, which builds the one detector configured with state.

Because most sites have no custom emoji, the `:` trigger and its gate are
only wired into the scanner when names are actually present, so plain
posts keep skipping the walk. The importer rewrites `:name:` through an
emoji-name map (a conflict may rename it) and falls back to the source
name when there's no match.

[ci skip]
2026-07-08 22:35:56 +02:00
..
migrations MT: Convert custom emoji into placeholder embeds 2026-07-08 22:35:56 +02:00
migrations-tooling.rb