pcre2_substitute() is not following the documentation's recommended practice for handling MARK names with embedded NULs.
The CRLF-handling code assumes that, if newline_convention is not CR or LF, then CRLF is a valid newline. Presumably, this was true once upon a time, but now PCRE2_NEWLINE_NUL has been added. Corrected this minuscule error.
pcre2_substitute()
is not following the documentation's recommended practice for handling MARK names with embedded NULs.