.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / remark-stringify / lib / util / label.js
1 'use strict';
2
3 module.exports = label;
4
5 /* Stringify a reference label.
6  * Because link references are easily, mistakingly,
7  * created (for example, `[foo]`), reference nodes have
8  * an extra property depicting how it looked in the
9  * original document, so stringification can cause minimal
10  * changes. */
11 function label(node) {
12   var type = node.referenceType;
13   var value = type === 'full' ? node.identifier : '';
14
15   return type === 'shortcut' ? value : '[' + value + ']';
16 }