Skip to content

Conversation

@ahmadbky
Copy link
Member

@ahmadbky ahmadbky commented Jan 9, 2026

  • Rename rm_mp_style to unstyled
  • Make it remove link tags

Refs: #112.

* Rename `rm_mp_style` to `unstyled`
* Make it remove link tags

Refs: #112.
@ahmadbky ahmadbky linked an issue Jan 9, 2026 that may be closed by this pull request
@ahmadbky ahmadbky requested a review from Copilot January 9, 2026 10:33
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request renames the SQL function rm_mp_style to unstyled and enhances it to remove link tags in addition to style codes from ManiaScript/TrackMania formatted names.

Key changes:

  • Created a database migration that drops the old rm_mp_style function and creates the new unstyled function
  • Enhanced the regex pattern to handle link tags ($l[...] and $L[...]) in addition to existing style codes
  • Updated all function calls across the codebase from rm_mp_style to unstyled

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
crates/player-map-ranking/src/lib.rs Updated function calls from rm_mp_style to unstyled for map and player name processing
crates/migration/src/m20260109_101455_refactor_rm_mp_style/func_management.rs New module defining constants for both old and new SQL function definitions
crates/migration/src/m20260109_101455_refactor_rm_mp_style/create_function_unstyled.sql New SQL function definition with enhanced regex to remove link tags
crates/migration/src/m20260109_101455_refactor_rm_mp_style/create_function_rm_mp_style.sql Preserved old function definition for migration rollback support
crates/migration/src/m20260109_101455_refactor_rm_mp_style.rs Migration logic to drop old function and create new one with rollback capability
crates/migration/src/lib.rs Registered the new migration in the migrator
crates/graphql-api/src/utils/records_filter.rs Updated three function calls from rm_mp_style to unstyled for player/map name filtering
crates/graphql-api/src/objects/root.rs Updated three function calls from rm_mp_style to unstyled for player/map name queries

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

ahmadbky and others added 3 commits January 9, 2026 12:58
* Rename back `unstyled` SQL function to `rm_mp_style`.
* Use new `unstyled` function in entity everywhere needed.

Refs: #112.
…ate_new_function_rm_mp_style.sql

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@ahmadbky ahmadbky merged commit 5d6d945 into master Jan 9, 2026
3 checks passed
@ahmadbky ahmadbky deleted the 112-fix-rm_mp_style branch January 9, 2026 23:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix rm_mp_style SQL function not removing links

2 participants