code: function doItalicsAndBold(text) {
  
          text = text.replace(/(\*\*|__)(?=\S)([^\r]*?\S[*_]*)\1/g, "<strong>$2</strong>");
          text = text.replace(/(\*|_)(?=\S)([^\r]*?\S)\1/g, "<em>$2</em>");
  
          return text;
      }
docs: }}} {{{ doItalicsAndBold