[wp-meta] [Making WordPress.org] #6052: Tag Make posts to ping teams/team-reps
Making WordPress.org
noreply at wordpress.org
Thu Feb 24 03:38:02 UTC 2022
#6052: Tag Make posts to ping teams/team-reps
--------------------------------------+---------------------
Reporter: tellyworth | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone:
Component: Make (Get Involved) / P2 | Resolution:
Keywords: |
--------------------------------------+---------------------
Comment (by dd32):
In r18494-dotorg:
{{{
Inline Terms / o2 xposts: Update the regex for xposts to use positive look
behind/ahead to support matching multiple xposts on new lines.
See https://meta.trac.wordpress.org/ticket/6052
}}}
{{{
#!diff
- const XPOSTS_REGEX =
'/(?:^|\s|>|\()\+([\w\-\.\/]+)(?:$|\b|\s|<|\))/';
+ const XPOSTS_REGEX =
'/(?<=^|\s|>|\()\+([\w\-\.\/]+)(?=$|\b|\s|<|\))/';
}}}
Hard to explain, but xposts with multiple in a row with a single space
between them, or with newlines between them only, would cause every second
xpost to match and work.
Ie. `+make.wordpress.org/site/ +make.wordpress.org/site2/` wouldn't work
unless there were multiple spaces between them.
Real world example: https://make.wordpress.org/docs/2022/02/20/the-
hashtag-and-its-future-in-documentation-articles/#comment-40320 Only every
second item was linked. I edited and re-saved after this change and it now
xpost'd to all / linked to all.
--
Ticket URL: <https://meta.trac.wordpress.org/ticket/6052#comment:7>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org
More information about the wp-meta
mailing list