Sha256: 0773c0611243b6e2096d1263cda047f9f26349238382492113b90b43f52070b7
Contents?: true
Size: 594 Bytes
Versions: 8
Compression:
Stored size: 594 Bytes
Contents
const { concat, hardline, indent, join } = require("../../prettier"); // http://haml.info/docs/yardoc/file.REFERENCE.html#haml-comments-- const hamlComment = (path, opts, _print) => { const node = path.getValue(); const parts = ["-#"]; if (node.value.text) { if (opts.originalText.split("\n")[node.line - 1].trim() === "-#") { const lines = node.value.text.trim().split("\n"); parts.push(indent(concat([hardline, join(hardline, lines)]))); } else { parts.push(" ", node.value.text.trim()); } } return concat(parts); }; module.exports = hamlComment;
Version data entries
8 entries across 8 versions & 1 rubygems