Operation request: Prepend/append text
- Dominant language
- JavaScript
- Stars
- 35.8k
- Forks
- 4.1k
- Avg merge
- 2d 26m
- Merged PRs (30d)
- 33
Description
## Summary
Especially when using the fork or the subsection operation, it would be useful to be able to
1. Extract relevant parts
2. Modify them
3. Wrap them in surrounding text
The last step here is rather clunky at the moment, since it involves having to whip out find and replace regex which simply match everything
Up to step 2

Current workaround for step 3, notice how the regex is quite odd since `.*` doesn't work as expected.

### Example
https://gchq.github.io/CyberChef/#recipe=Subsection('%20%5C%5Cd%2B',true,true,false)Find_/_Replace(%7B'option':'Regex','string':'(%5C%5Cd%2B)'%7D,'$1%201',true,false,true,false)Sum('Space')Find_/_Replace(%7B'option':'Regex','string':'%5B%5E%5D%2B'%7D,'%20$%26',true,false,true,true)&input=bWVzc2FnZSBHYW1lQWN0aW9uIHsKICAgIG9uZW9mIGFjdGlvbiB7CiAgICAgICAgQ2xpZW50UGxheWVyTW92ZSB1aW50MzIgY19wbGF5ZXJfbW92ZSA9IDA7CiAgICAgICAgU2VydmVyUGxheWVyTW92ZSBzX3BsYXllcl9tb3ZlID0gMTsKCiAgICAgICAgQ2xpZW50UGxheWVyVXBkYXRlIGNfcGxheWVyX3VwZGF0ZSA9IDI7CiAgICAgICAgU2VydmVyUGxheWVyVXBkYXRlIHNfcGxheWVyX3VwZGF0ZSA9IDM7CiAgICB9Cn0
Contributor guide
Research direction
Start by examining the existing Fork and Subsection operations and the linked CyberChef recipe to understand how extracted text is currently modified and wrapped. Done means providing a way to prepend and append surrounding text without the workaround regex, with behavior covering the extraction and modification workflow described in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- web-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100