function escapeForMultilineComment(line) {
	return line.replaceAll(
		/(`*)([^`]+)\1/gu,
		(substring, backticks, capture) => {
			// In a TSDoc comment, the sequence `*/` ("*" + "/") must be escaped as `*\/`.
			// But escaping inside a markdown code block is not possible, so discard the backticks.
			if (capture.includes("*/")) {
				return capture.replaceAll("/", "\\/");
			}
			return substring;
		},
	);
}
Escapes a line of markdown text so it can be safely inserted into a TSDoc comment.
@param {string} line A line of markdown text.
@returns {string} The escaped text.