Class: PrettyDiff

Defined in: src/beautifiers/prettydiff.coffee
Inherits: Beautifier

Variables Summary

name =
"Pretty Diff"
options =
{

  /*
  Apply these options first / globally, for all languages
   */
  _: {
    inchar: "indent_char",
    insize: "indent_size",
    objsort: function(objsort) {
      return objsort || false;
    },
    preserve: [
      'preserve_newlines', function(preserve_newlines) {
        if (preserve_newlines === true) {
          return "all";
        } else {
          return "none";
        }
      }
    ],
    cssinsertlines: "newline_between_rules",
    comments: [
      "indent_comments", function(indent_comments) {
        if (indent_comments === false) {
          return "noindent";
        } else {
          return "indent";
        }
      }
    ],
    force: "force_indentation",
    quoteConvert: "convert_quotes",
    vertical: [
      'align_assignments', function(align_assignments) {
        if (align_assignments === true) {
          return "all";
        } else {
          return "none";
        }
      }
    ],
    wrap: "wrap_line_length",
    space: "space_after_anon_function",
    noleadzero: "no_lead_zero",
    endcomma: "end_with_comma",
    methodchain: [
      'break_chained_methods', function(break_chained_methods) {
        if (break_chained_methods === true) {
          return false;
        } else {
          return true;
        }
      }
    ],
    ternaryline: "preserve_ternary_lines"
  },

  /*
  Apply language-specific options
   */
  CSV: true,
  Coldfusion: true,
  ERB: true,
  EJS: true,
  HTML: true,
  XML: true,
  SVG: true,
  Spacebars: true,
  JSX: true,
  JavaScript: true,
  CSS: true,
  SCSS: true,
  Sass: true,
  JSON: true,
  TSS: true,
  Twig: true,
  LESS: true,
  Swig: true,
  Visualforce: true,
  "Riot.js": true
}

Variable inherited from Beautifier

Promise name options languages beautify _envCache _envCacheDate _envCacheExpiry logger

Instance Method Summary

Inherited Method Summary

Methods inherited from Beautifier

#deprecate #tempFile #readFile #getShellEnvironment #which #commandNotFoundError #run #spawn #setupLogger

Instance Method Details

# (void) beautify(text, language, options)

    Quickly fuzzy find classes, mixins, methods, file:

    Control the navigation frame:

    You can focus and blur the search input: