docs: function escapeCommonChars(text) {
    /**
     * Generate new non-escape expression (must happen at execution time because
     * we use `RegExp.exec`, which tracks it's own state internally).
     */
    const nonEscapeExpression = new RegExp(nonEscapePattern, 'gm');
  
    /**
     * Use `replaceWhen` to escape markdown entities only within substrings that
     * are eligible for escaping.
     */
    return replaceWhen(nonEscapeExpression, escapeAll, text, true);
  }