.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / remark-stringify / lib / util / enclose-title.js
1 'use strict';
2
3 module.exports = enclose;
4
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;
13 }