DomStrReplace: Add regex backreference example

Created on 12 March 2024, about 1 year ago
Updated 1 August 2024, 8 months ago

Problem/Motivation

There's no regex backreference example in the code examples/documentation for the DomStrReplace process plugin:
https://git.drupalcode.org/project/migrate_plus/-/blob/06f7c54bfee254531...

Steps to reproduce

N/A

Proposed resolution

I recommend adding a code example with a regex backreference, like what's in the StrReplace process plugin:
https://git.drupalcode.org/project/migrate_plus/-/blob/06f7c54bfee254531...

Maybe maybe maybe it's excessive/unnecessary because there's already an example in the StrReplace process plugin?? -- I didn't think to look there when I needed help, but I'm only one person -- but if the consensus is "let's not put everything everywhere," maybe we could point to the StrReplace example? -- i.e.

Regex backreferences can be used in "replace" values. See StrReplace process plugin for an example [with or without link??].

Remaining tasks

(do, or do not)

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Fixed

Version

6.0

Component

Documentation

Created by

πŸ‡ΊπŸ‡ΈUnited States alison

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @alison
  • Pipeline finished with Success
    about 1 year ago
    Total: 216s
    #117755
  • Status changed to Needs review about 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States alison

    I submitted a MR with a new code example, based on something I wrote/used myself earlier today.

    (It's not exactly like str_replace, simply because the code examples in dom_str_replace are structured differently -- with less extensive explanations -- and I didn't restructure what's in dom_str_replace. So, that's why that is.)

    (See "Issue summary" > "Proposed resolution" for an alternative idea.)

  • Pipeline finished with Success
    10 months ago
    Total: 218s
    #184543
  • Status changed to RTBC 10 months ago
  • πŸ‡ΊπŸ‡ΈUnited States benjifisher Boston area

    Extra examples in documentation are usually a good thing. I reviewed this one, and it is not an exception.

    Thanks for making it easier for the next person trying to make sense of the DOM plugins!

  • Pipeline finished with Skipped
    8 months ago
    #228191
  • First commit to issue fork.
  • Status changed to Fixed 8 months ago
  • heddn Nicaragua

    Thanks for your contributions!

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024