Page MenuHomePhorge

New project remarkup rule misses some project names
Open, Needs TriagePublic

Description

I have updated to the newest version and there is a regression from rP9c73d62c4466: Rewrite regex for project names to be not prone to catastrophic backtracking / T15371: RuntimeException in preg_replace_callback: Text disappears due to catastrophic backtracking regex in Remarkup parsing

We have a project called JS-Draw-Lib (hashtag #js-draw-lib). This project name isn't parsed anymore in Remarkup. I have played with some hashtags:

#js-draw-lib - ⛔
#js_draw-lib - ✅
#js-draw_lib - ⛔
#js-draw - ⛔
#jsdraw - ✅
#jsd-raw - ✅

When I reverse rP9c73d62c446613551fe5cbee4d618b982a7f5f0a, every hashtag works. The problem seems to be two letters followed by a hyphen.

Revisions and Commits

Event Timeline

@pppery I don't know if you wanna step in, since the change was introduced by you.

{#js-draw-lib} does work.

But it only renders a grey all purpose link, not using the project color and icon. That doesn't feel right.

That's true of all projects - Remarkup here for instance.

That comment was mostly just a note to myself when investigating the code.