3 module.exports = enclose;
5 /* There is currently no way to support nested delimiters
6 * across Markdown.pl, CommonMark, and GitHub (RedCarpet).
7 * The following code supports Markdown.pl and GitHub.
8 * CommonMark is not supported when mixing double- and
9 * single quotes inside a title. */
10 function enclose(title) {
11 var delimiter = title.indexOf('"') === -1 ? '"' : '\'';
12 return delimiter + title + delimiter;