Mon, Dec 9
Thu, Dec 5
Sat, Nov 23
Digging deeper, the problem is specific to ProjectRemarkupRule::getObjectIDPattern. That returns:
Step 2: Remove irrelevant character class exclusions:
Disentangling that monster regex, step 1:
Indeed https://devina.io/redos-checker says the aformentioned regex is exponential time worst-case
I monkeypatched the code to print preg_last_error when the problematic preg_match returns null. The error is "Backtrack limit exhausted".
Oct 25 2024
This exception happens once $rule in the loop foreach ($this->getMarkupRules() as $rule) in PhutilRemarkupBlockRule::applyRules($text) becomes ProjectRemarkupRule. That's where it blows up.
Sep 16 2024
Taking the best from the two: what about assuming a default @link /book/group/best-document-ever-about-link - but still allowing custom @link to allow easy migrations?
Aug 5 2024
This is an issue in https://we.phorge.it/source/phorge/browse/master/src/infrastructure/markup/rule/PhabricatorObjectRemarkupRule.php . In getObjectEmbedPattern(), preg_quote($prefix) returns \# and the method finally returns (\B{\#([^.\s?!,:;{}#\(\)"'\*/~]+(?:[^\s?!,:;{}#\(\)"'\*/~]*[^.\s?!,:;{}#\(\)"'\*/~]+)*)([,\s](?:[^}\\]|\\.)*)?}\B)u.
Within apply($text), $text becomes null after that first preg_replace_callback, so the second call barks.
Aug 4 2024
Jul 29 2024
Jul 1 2024
I think GitHub allows that syntax only in comments 🤔
I was unaware of #0969DA syntax from github/gitlab. I'm not sure if I like that syntax better than {} but I am generally in favor of using the same syntax as other systems in order to converge towards defacto standardization.
Jun 30 2024
Thanks again @20after4 for the efforts.
Jun 29 2024
Jun 27 2024
(re-opening, there's more work left here)
Jun 26 2024
Jun 23 2024
May 2 2024
To implement this, you may want to start from this 🌈
Anyway, even with this fix, for some reasons I can't still use this feature with a comment like {#0000ff} in my local installation 🤔 I'm confused since the unit test works.
@valerio.bozzolan yes, just now. I have only realized that there is a fix already after opening the ticket raised as a concern. Hadn't checked this in the past few days, so here I am, finally with my account approved and the issue is fixed. Thank you. :)
@zajdee have you already tried to update to latest master? After 6ab2b56a1a4a6 I mean. Thanks for this confirmation
EDIT: This was already reported and resolved in T15802: Regression: HTML entities rendered as plain text in config option descriptions, I'm keeping the comment just to track this.
Apr 30 2024
Or wrap a text with a background color - (something like What if I can change the background color here (and no italics)?)
Apr 29 2024
I'm somehow even more inclined to propose to base this feature on a new custom parser, like cowsay {{{ asd }}}
Minor clarification.
Apr 11 2024
Apr 2 2024
Well, you know what would be next level for a dev? If (s)he clicks on it, the color is copied to the clipboard. We can't use this behavior, because behaviors loose their state in the remarkup cache...
Apr 1 2024
This D25540: Add PhutilRemarkupHexColorCodeRule, a new remarkup rule to format color codes should be ready to merge now, if someone wouldn't mind reviewing it.