lib/format/markdown.js
function safeDelimiter(s, delimiter) {
  if (delimiter === undefined) {
    delimiter = '```';
  }
  while (s.indexOf(delimiter) !== -1) {
    delimiter += '`';
  }
  return delimiter;
}
function safeDelimiter(s, delimiter) {
  if (delimiter === undefined) {
    delimiter = '```';
  }
  while (s.indexOf(delimiter) !== -1) {
    delimiter += '`';
  }
  return delimiter;
}
safeDelimiter tries to find a safe delimiter by appending backticks until it finally finds it.

@param {string} s String that should be delimited.
@param {string} delimiter Initial delimiter.
@returns Safe delimiter.