Description:
The built-in wikitext Search and Replace tool does not recognize \n as a newline character in the "Replace" field. This prevents users from introducing new line breaks into text.
The Issue:
- Capture groups work: Using Search: (\n) and Replace: $1$1 successfully doubles existing newlines.
- Literal insertion fails: If the search pattern does not contain a newline (e.g., searching for a period . to turn it into a newline), there is no way to represent a newline in the Replace box. Entering \n results in the literal text "\n" being inserted.
Steps to Reproduce:
- Open the Search and Replace tool.
- Search for any character (e.g., ,).
- Attempt to replace it with a newline by typing \n in the Replace field.
- Result: The tool inserts the literal string "\n" instead of a line break.
Expected Behavior:
The Replace field should interpret \n as a newline character (LF) so that users can introduce structural changes to the text without relying on existing capture groups.