Sha256: f275183aab7619d57be2e55cf27db54442413021f58bd0ed1b8fd283f0095d2c

Contents?: true

Size: 397 Bytes

Versions: 8

Compression:

Stored size: 397 Bytes

Contents

const { concat, group, hardline, indent, join } = require("../../prettier");

// http://haml.info/docs/yardoc/file.REFERENCE.html#filters
const filter = (path, _opts, _print) => {
  const { value } = path.getValue();

  return group(
    concat([
      ":",
      value.name,
      indent(concat([hardline, join(hardline, value.text.trim().split("\n"))]))
    ])
  );
};

module.exports = filter;

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
prettier-0.20.0 src/haml/nodes/filter.js
prettier-0.19.1 src/haml/nodes/filter.js
prettier-0.19.0 src/haml/nodes/filter.js
prettier-0.18.2 src/haml/nodes/filter.js
prettier-0.18.1 src/haml/nodes/filter.js
prettier-0.18.0 src/haml/nodes/filter.js
prettier-0.17.0 src/haml/nodes/filter.js
prettier-0.16.0 src/haml/nodes/filter.js