Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Git log entries such as Merge branch '2060691-migrate-mentor-field' into 7.x-1.x
at https://www.drupal.org/node/651778/commits or any other list of commits are hard to read.
Is is possible either to render them properly or, to reduce confusion, at least disable linking to issues when the hash sign is immediately preceeded by an ampersand? For example, don't ever link ' in commit messages (or anywhere).
Comment | File | Size | Author |
---|---|---|---|
#2 | versioncontrol.2474005-apostrophe-issue-link.patch | 820 bytes | cburschka |
Comments
Comment #1
drummYep, I've seen this too. These Views are made by the VersionControl module.
Comment #2
cburschkaI've created a patch for this at #2474005: commitlog links "'" entity to node/039..
Moving it over here:
Comment #3
marvil07 CreditAttribution: marvil07 commented@cburschka thanks for the patch and the effort to report it here.
I have not tried the patch yet, but any reason to not use a boundary meta-character instead?
i.e.
'/\b#(\d+)\b/i'
Comment #4
cburschkaHmm... that would definitely exclude entities (since & and # are both non-word) but isn't whitespace also a non-word character? If I understand the \b assertion right, this would require the # to be preceded by
[a-zA-Z0-9_]
...Eg. "Issue #123" isn't matched by
\b#\d+\b
; only "Issue#123" is.Comment #5
jacob.embree CreditAttribution: jacob.embree at St. Louis Integration commentedI tested #2. It fixed the apostrophe problem.
Comment #6
drummConfirming this looks good on a Drupal.org dev site and looks safe.
Comment #8
marvil07 CreditAttribution: marvil07 as a volunteer commented@jacob.embree, @drumm: Thanks for the reviews.
The patch is now added to 7.x-1.x, I guess it is time to plan for a new release.
I added a follow-up to add related tests on #2915026: Add tests for versioncontrol_handler_field_operation_message with a not-yet-working patch, help there is appreciated.
Comment #9
drummThanks, this has been deployed to Drupal.org.