Compare Code
Function
Latest Commit:15 Aug 2018 Version: 3.0.0
Accessibility note: Hold shift and press control key twice to focus on the previous element or press control twice to focus away from this textarea.
Please feel free to submit feedback about Pretty Diff at any time by answering the following questions.
How likely are you to recommend Pretty Diff to a friend or coworker? Never Not Likely Rarely Maybe Probably Frequently Always
General statistics | |
---|---|
Total number of page loads | 0 |
Total usage count | 0 |
Start date of logging | |
Average page loads per day | 0 |
Average uses per day | 0 |
Largest code source | 0 |
Usage statistics | |
Diff | 0 |
Beautification | 0 |
Minification | 0 |
Parse Table | 0 |
Analysis | 0 |
Language statistics | |
Markup | 0 |
JavaScript | 0 |
CSS | 0 |
CSV | 0 |
Plain text | 0 |
Ace Code Editor
Brace Lines (brace_line)
If true an empty line will be inserted after opening curly braces and before closing curly braces.
Brace Padding (brace_padding)
Inserts a space after the start of a container and before the end of the container if the contents of that container are not indented; such as: conditions, function arguments, and escaped sequences of template strings.
Emulates JSBeautify's brace_style option using existing Pretty Diff options. none — Ignores this option
Style of Indent (braces)
Determines if opening curly braces will exist on the same line as their condition or be forced onto a new line.
The color scheme of the reports. white — A white and pale grey color scheme
Force an Empty Line Above Comments (comm_line)
If a blank new line should be forced above comments.
Indent Comments (comments)
This will determine whether comments should always start at position 0 of each line or if comments should be indented according to the code.
Generate A Complete HTML File (complete_document)
Allows a preference for generating a complete HTML document instead of only generating content.
Compressed CSS (compressed_css)
If CSS should be beautified in a style where the properties and values are minifed for faster reading of selectors.
IE Comments (HTML Only) (conditional)
If true then conditional comments used by Internet Explorer are preserved at minification of markup.
Ignore Content (content)
This will normalize all string content to 'text' so as to eliminate some differences from the output.
Fix Sloppy Code (correct)
Automatically correct some sloppiness in code.
Line Termination (crlf)
If line termination should be Windows (CRLF) format. Unix (LF) format is the default.
Insert Empty Lines (css_insert_lines)
Inserts new line characters between every CSS code block.
The character to be used as a separator if lang is 'csv'. Any string combination is accepted.
Code Comments (diff_comments)
If true then comments will be preserved so that both code and comments are compared by the diff engine.
This shortens the diff output by allowing a specified number of equivalent lines between each line of difference. This option is only used with diff_format:html.
The format of the output. The command line output format is text, similar to Unix 'diff'. text — Formatted similar to the Unix 'diff' command line utility.
This allows for a descriptive label for the diff file code of the diff HTML output.
Compare Rendered HTML (diff_rendered_html)
Compares complete HTML documents and injects custom CSS so that the differences display not in the code, but in the rendered page in a browser. This option is currently confined only to markup languages, read_method file, and mode diff. Option diff_format is ignored.
Remove White Space (diff_space_ignore)
If white space only differences should be ignored by the diff tool.
This determines whether the diff HTML output should display as a side-by-side comparison or if the differences should display in a single table column. sidebyside — Two column comparison of changes.
Else On New Line (else_line)
If elseline is true then the keyword 'else' is forced onto a new line.
Which index of the parse table should the application stop. This option is useful internally when recursively sliding between various libraries. The default value of 0 means to ignore this option.
If there should be a trailing comma in arrays and objects. Value "multiline" only applies to modes beautify and diff. never — Remove trailing commas
Force Indentation of All Attributes (force_attribute)
If all markup attributes should be indented each onto their own line.
Force Indentation of All Content (force_indent)
Will force indentation upon all content and tags without regard for the creation of new text nodes.
Determines if all array indexes should be indented, never indented, or left to the default. default — Default formatting
Determines if all object keys should be indented, never indented, or left to the default. default — Default formatting
Space After Function Name (function_name)
If a space should follow a JavaScript function name.
The string characters to comprise a single indentation. Any string combination is accepted.
How much indentation padding should be applied to beautification? This option is internally used for code requires switching between libraries.
The number of 'inchar' values to comprise a single indentation.
An educational tool to generate HTML output of JavaScript code to identify scope regions and declared references by color. none — prevents use of this option
The lowercase single word common name of the source code's programming language.
The fallback option if option 'lang' is set to 'auto' and a language cannot be detected.
The formatted proper name of the code sample's language for use in reports read by people.
This option determines which sets of rules to use in the language parser. If option 'language' has a value of 'auto', which is the default value, this option is ignored. script — parses languages with a C style syntax, such as JavaScript
When to break consecutively chained methods and properties onto separate lines. A negative value disables this option. A value of 0 ensures method chains are never broken.
Minification Wrapping (minify_wrap)
Whether minified script should wrap after a specified character width. This option requires a value from option 'wrap'.
Never Flatten Destructured Lists (never_flatten)
If destructured lists in script should never be flattend.
New Line at End of Code (new_line)
Insert an empty line at the end of output.
Case Indentation (no_case_indent)
If a case statement should receive the same indentation as the containing switch block.
Leading 0s (no_lead_zero)
Whether leading 0s in CSS values immediately preceeding a decimal should be removed or prevented.
Object/Attribute Sort (object_sort)
Sorts markup attributes and properties by key name in script and style.
Determines the output format for 'parse' mode. parallel — returns an object containing series of parallel arrays
Retain White Space Tokens in Parse Output (parse_space)
Whether whitespace tokens should be included in markup parse output.
The maximum number of consecutive empty lines to retain.
Eliminate Word Wrap Upon Comments (preserve_comment)
Prevent comment reformatting due to option wrap.
Normalize Quotes (quote)
If true and mode is 'diff' then all single quote characters will be replaced by double quote characters in both the source and diff file input so as to eliminate some differences from the diff report HTML output.
If the quotes of script strings or markup attributes should be converted to single quotes or double quotes. none — Ignores this option
Indent Size (selector_list)
If comma separated CSS selectors should present on a single line of code.
Indent Size (semicolon)
If true and mode is 'diff' and lang is 'javascript' all semicolon characters that immediately preceed any white space containing a new line character will be removed so as to elimate some differences from the code comparison.
This allows for a descriptive label of the source file code for the diff HTML output.
Function Space (space)
Inserts a space following the function keyword for anonymous functions.
Close Markup Self-Closing Tags with a Space (space_close)
Markup self-closing tags end will end with ' />' instead of '/>'.
The parse table index to start working from. This is internally used for code samples that require switching between different libraries.
Provides a collection of option presets to easily conform to popular JavaScript style guides. none — Ignores this option
Merge Adjacent Start and End tags (tag_merge)
Allows immediately adjacement start and end markup tags of the same name to be combined into a single self-closing tag.
Sort Markup Child Items (tag_sort)
Sort child items of each respective markup parent element.
Keep Ternary Statements On One Line (ternary_line)
If ternary operators in JavaScript (? and :) should remain on the same line.
Preserve Markup Text White Space (text_preserve)
If text in the provided markup code should be preserved exactly as provided. This option eliminates beautification and wrapping of text content.
Retain Comment At Code Start (top_comments)
If mode is 'minify' this determines whether comments above the first line of code should be kept.
Markup Tag Preservation (unformatted)
If markup tags should have their insides preserved.
If consecutive JavaScript variables should be merged into a comma separated list or if variables in a list should be separated. none — Ignores this option.
Vertical Alignment (vertical)
If lists of assignments and properties should be vertically aligned. This option is not used with the markup lexer.
Character width limit before applying word wrap. A 0 value disables this option. A negative value concatenates script strings.