Actualizacion maquina principal
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / remark-stringify / lib / util / label.js
diff --git a/.config/coc/extensions/node_modules/coc-prettier/node_modules/remark-stringify/lib/util/label.js b/.config/coc/extensions/node_modules/coc-prettier/node_modules/remark-stringify/lib/util/label.js
new file mode 100644 (file)
index 0000000..bf6f587
--- /dev/null
@@ -0,0 +1,16 @@
+'use strict';
+
+module.exports = label;
+
+/* Stringify a reference label.
+ * Because link references are easily, mistakingly,
+ * created (for example, `[foo]`), reference nodes have
+ * an extra property depicting how it looked in the
+ * original document, so stringification can cause minimal
+ * changes. */
+function label(node) {
+  var type = node.referenceType;
+  var value = type === 'full' ? node.identifier : '';
+
+  return type === 'shortcut' ? value : '[' + value + ']';
+}