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

rubric.jsonevals/scenario-10/

{
  "context": "This criteria evaluates how well the engineer uses linkify-it's internal regex building blocks to implement a custom protocol validator. The focus is on accessing and utilizing the library's pre-compiled regex patterns (via self.re) to construct validation logic, rather than writing regex patterns from scratch.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Import linkify-it",
      "description": "Code imports or requires the linkify-it package correctly",
      "max_score": 10
    },
    {
      "name": "Create instance",
      "description": "Code creates a linkify-it instance (e.g., using LinkifyIt() or new LinkifyIt())",
      "max_score": 10
    },
    {
      "name": "Use .add() method",
      "description": "Code uses the .add() method to register the custom 'doc:' schema",
      "max_score": 15
    },
    {
      "name": "Custom validator function",
      "description": "Code provides a validate function (not just a regex) that accepts (text, pos, self) parameters",
      "max_score": 20
    },
    {
      "name": "Access self.re",
      "description": "Code accesses the self.re property to use linkify-it's internal regex building blocks",
      "max_score": 25
    },
    {
      "name": "Lazy regex compilation",
      "description": "Code implements lazy regex compilation by checking if the pattern exists (e.g., if (!self.re.custom_pattern)) before creating it",
      "max_score": 10
    },
    {
      "name": "Return match length",
      "description": "Validator function returns the matched length on success and 0 on failure, as required by linkify-it's validator API",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-linkify-it

tile.json