CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-linkify-it

Links recognition library with FULL unicode support for detecting high-quality link patterns in plain text

Overall
score

97%

Overview
Eval results
Files

task.mdevals/scenario-3/

Multilingual Mention Detector

A utility that detects and extracts user mentions (handles) from multilingual text content, supporting international characters and unicode patterns.

Capabilities

Unicode-aware mention detection

  • Detects a mention @user123 in plain ASCII text and extracts the handle "user123" @test
  • Detects a mention @用户名 (Chinese characters) and extracts the handle "用户名" @test
  • Detects a mention @مستخدم (Arabic characters) and extracts the handle "مستخدم" @test
  • Detects multiple mentions @alice @боб @carlos in mixed script text and extracts all three handles @test

Handle validation with unicode patterns

  • Accepts handles with emoji: @user😀 is valid and extracts "user😀" @test
  • Stops at whitespace: @user hello extracts only "user" @test
  • Stops at punctuation: @user. extracts only "user" (period not included) @test

Implementation

@generates

API

/**
 * Detects user mentions in text with full Unicode support.
 * Mentions start with @ followed by one or more unicode letters, numbers, underscores, or emoji.
 *
 * @param {string} text - The text to scan for mentions
 * @returns {Array<{handle: string, url: string, start: number, end: number}>}
 *          Array of detected mentions with their handles and metadata
 */
function detectMentions(text) {
  // IMPLEMENTATION HERE
}

module.exports = { detectMentions };

Dependencies { .dependencies }

linkify-it { .dependency }

Provides link detection with unicode pattern support for building custom mention schemas.

@satisfied-by

Install with Tessl CLI

npx tessl i tessl/npm-linkify-it

tile.json