DomStrReplace: Add regex backreference example

Created on 12 March 2024, 4 months ago
Updated 30 May 2024, 27 days 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

RTBC

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
    4 months ago
    Total: 216s
    #117755
  • Status changed to Needs review 4 months 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
    28 days ago
    Total: 218s
    #184543
  • Status changed to RTBC 27 days 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!

Production build 0.69.0 2024