Thanks for the continued suggestions. I haven’t been able to find a way to only replacen instances of the string. It looks like the replace implementation always replaces all instances of the string. It’d be nice if we could do something similar to findRE and do replace INPUT OLD NEW NUM.
Additionally, it seems findRE just returns the string it found and not the position and <!--more--> is implemented as </p>(.|\n\n)<p>. This is the same behavior as how paragraphs are implemented on the Markdown side making <!--more--> match all other paragraphs in .Content.
I think this just points me towards the fact my use case is truly unique and I should probably rethink my use case haha.
It checks if there are more than one </p>\n\n<p> blocks in the content, if there are not it prints it directly. If there are it writes each to | safeHTML and appends </p>\n\n<p> except for the first.
Edit: It’s certainly not perfect, the following scenario will still break it, but I can live with it: