Sha256: db0e5a74d8bc06721910d99272be3b7263cb19538a8b87c0f8287ac1d4f23d3d
Contents?: true
Size: 591 Bytes
Versions: 8
Compression:
Stored size: 591 Bytes
Contents
const { concat, hardline, indent, join } = require("../../prettier"); // https://haml.info/docs/yardoc/file.REFERENCE.html#haml-comments-- function 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