Review 12.4 Merged

92864[BUGFIX] Allow capturing regexp replace in CKEditor 5

Garvin Hicking CR +2 V +2 Easy +3 −3 updated 02/17/26, 13:19

Commit message

With #104827 the support for regular expression replacements
in CKEditor 5 via `editor.config.typing.transformations` was
added.

This missed the possible scenario, where the target replacements
may contain capturing replacement groups with entries having
`null` as their values instead of strings.

For this, an exemption in the JavaScipt evaluation needs to be
made for these `null` types to not break the execution flow.

This now allows to use such a YAML configuration:

```
editor:
  config:
    typing:
      transformations:
        remove:
          - 'symbols'
          - 'quotes'
          - 'arrowLeft'
          - 'arrowRight'
        extra:
          - {from: {pattern: '(tsconf|t3ts)$', flags: ''}, to: 'TYPO3 TypoScript TSConfig'}
          - {from: {pattern: '(")([^"]*)(")$', flags: ''}, to: ['»', null, '«']}

```

(Note for this replacement group to work the "normal" quote conversion
mechanism first needs to be disabled)

Review

  • Code review CR +2 Done
    • Garvin Hicking +2
  • Verified V +2 Done
    • Garvin Hicking +2
    • core-ci +1 CI

Issues 2

Files 2

Review log 68

  1. Garvin Hicking commented on patch set 1 02/17/26, 10:02

    Cherry Picked from branch main. The following files contain Git conflicts: * Build/Sources/TypeScript/rte-ckeditor/ckeditor5.ts * typo3/sysext/rte_ckeditor/Resources/Public/JavaScript/ckeditor5.js
  2. core-ci voted on patch set 1 V -1 02/17/26, 10:12 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96020

  3. Garvin Hicking commented on patch set 1 02/17/26, 10:19

    Different dirname, - / _ Needs work that I will do later on desktop
  4. Garvin Hicking uploaded patch set 2 V -1 02/17/26, 12:38

    merge conflict resolving
  5. core-ci voted on patch set 2 V +1 02/17/26, 12:45 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96041

  6. Garvin Hicking marked it ready for review 02/17/26, 13:19

  7. Garvin Hicking voted on patch set 2 CR +2 V +2 02/17/26, 13:19

  8. Garvin Hicking merged patch set 3 02/17/26, 13:19