Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 749cd19289
Fetching contributors…

Cannot retrieve contributors at this time

1 lines (1 sloc) 21.944 kb
<?xml version='1.0' encoding='UTF-8' ?><!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.1//EN' 'http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd'><html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en'><head> <title>Pretty Diff - The difference tool</title> <meta name="robots" content="index, follow"/> <meta name="DC.title" content="Pretty Diff - The difference tool"/> <link rel='canonical' href='http://prettydiff.com' type='application/xhtml+xml' /> <link rel="icon" type="image/x-icon" href="http://prettydiff.com/images/favicon.ico"/> <link rel="meta" href="http://prettydiff.com/labels.rdf" type="application/rdf+xml" title="ICRA labels"/> <meta http-equiv="pics-Label" content='(pics-1.1 "http://www.icra.org/pics/vocabularyv03/" l gen true for "http://prettydiff.com" r (n 0 s 0 v 0 l 0 oa 0 ob 0 oc 0 od 0 oe 0 of 0 og 0 oh 0 c 1) gen true for "http://www.prettydiff.com" r (n 0 s 0 v 0 l 0 oa 0 ob 0 oc 0 od 0 oe 0 of 0 og 0 oh 0 c 1))'/> <meta name="author" content="Austin Cheney"/> <meta name="description" content="Pretty Diff tool can minify, beautify (pretty-print), or diff between minified and beautified code. This tool can even beautify and minify HTML."/> <meta name="distribution" content="Global"/> <meta http-equiv="Content-Language" content="en"/> <meta http-equiv="Content-Type" content="application/xhtml+xml;charset=UTF-8"/> <meta http-equiv="Page-Enter" content="blendTrans(Duration=0)"/> <meta http-equiv="Page-Exit" content="blendTrans(Duration=0)"/> <meta http-equiv="content-style-type" content="text/css"/> <meta http-equiv="content-script-type" content="application/javascript"/> <meta name="google-site-verification" content="qL8AV9yjL2-ZFGV9ey6wU3t7pTZdpD4lIetUSiNen7E" /> <link rel="stylesheet" type="text/css" href="diffview.css" media="all"/> </head><body onload="pd.reload();" id="webtool"><ul id="displayOps" class="default"><li><button type="button" id="resetOptions" onclick="pd.reset();return false">Reset Options</button></li> <li><button type="button" id="hideOptions" onclick="pd.hideOptions(this);return false;">Maximize inputs</button></li></ul><div id="top"><h1><img src="images/pdlogo.jpg" alt="Pretty Diff - The difference tool"/> <span id="title_text">Pretty Diff - The difference tool</span></h1><div id="introduction"> <p>Use this free open-source file comparison tool to accurately diff between file versions <em>regardless of comments or minification</em> to the whitespace. This tool is written entirely in JavaScript and it can also beautify and minify HTML. To see the tool in action check out the <a href="http://prettydiff.com/samples.php">samples page</a>.</p> <p>For additional information, including integration with <a href="http://nodejs.org/">Node.js</a> and <a href="http://msdn.microsoft.com/en-us/library/9bbdkx3k%28v=VS.85%29.aspx">WSH</a>, please read the <a href="documentation.php"><strong>documentation</strong></a>. Please note that this tool is not a validator. Since this tool is client-side JavaScript only, meaning that the execution occurs on the local computer only and the resulting output is not transmitted or stored, it is safe for processing classified information. You can also find <a href="https://github.com/austincheney/Pretty-Diff">Pretty Diff on GitHub</a> and <a href="http://pastebin.com/">Pretty Diff for Pastebin</a>. For any questions please contact me at <a href="mailto:austin.cheney@us.army.mil">austin.cheney@us.army.mil</a>.</p> <p>If you get bored go check out my other projects: <strong>Mail Markup Language</strong> at <a href="http://mailmarkup.org/">http://mailmarkup.org/</a> and <a href="http://prettydiff.com/jsgui/">JSGUI (Incomplete)</a>.</p> <p id="update">Updated: 17 Apr 2012</p> <span class="clear"></span></div></div><div id="diffBase" class="wide"><h2>Base Text</h2><p class="labeltext"> <span> <input onkeyup="pd.options(this);" id="baselabel" type="text" value="base"/> <label for="baselabel">User supplied label (optional)</label></span></p><p> <label for="baseText" class="difflabel">Source code input for the diff operation.</label><textarea id="baseText" rows="10" cols="80" wrap="off"></textarea></p></div><div id="diffNew" class="wide"><h2>New Text</h2><p class="labeltext"> <span> <input onkeyup="pd.options(this);" id="newlabel" type="text" value="new"/> <label for="newlabel">User supplied label (optional)</label></span></p><p> <label for="newText" class="difflabel">Difference code input for the diff operation.</label><textarea id="newText" rows="10" cols="80" wrap="off"></textarea></p></div><div id="Beautify" class="wide" style="display:none;"><h2>Beautify Code</h2><p><label for="beautyinput">Beautification input</label><textarea onkeyup="recycle(event);" id="beautyinput" rows="10" cols="80" wrap="off"></textarea><label for="beautyoutput" class="outputlabel">Beautification output</label><textarea id="beautyoutput" readonly="readonly" rows="10" cols="40" name="paste_code" wrap="off"></textarea></p><span class="clear"></span></div><div id="Minify" class="wide" style="display:none;"><h2>Minify Code</h2><p><label for="minifyinput">Minification input</label><textarea onkeyup="recycle(event);" id="minifyinput" rows="10" cols="80" wrap="off"></textarea><label for="minifyoutput" class="outputlabel">Minification output</label><textarea id="minifyoutput" readonly="readonly" rows="10" cols="40" wrap="off"></textarea></p><span class="clear"></span></div><p class="button"><button value="Execute" onclick="recycle();" type="button">Execute</button></p><div id="options" class="options"><h2>Main Options</h2><p><strong>Function</strong><span> <input name="mode" type="radio" onclick="pd.prettyvis(this);" id="modediff" checked="checked"/> <label for="modediff">Pretty Diff</label></span><span> <input name="mode" type="radio" onclick="pd.prettyvis(this);" id="modebeautify"/> <label for="modebeautify">Beautify Code</label></span><span> <input name="mode" type="radio" onclick="pd.prettyvis(this);" id="modeminify"/> <label for="modeminify">Minify Code</label></span></p><p id="codetype"><strong>Code type</strong><span> <input name="paste_format" type="radio" id="ctype-auto" value="auto" onclick="pd.codeOps(false);pd.options(this);" checked="checked"/> <label for="ctype-auto">JavaScript, CSS, Markup</label></span><span> <input name="paste_format" type="radio" id="ctype-csv" value="csv" onclick="pd.codeOps(true);pd.options(this);"/> <label for="ctype-csv">CSV</label></span><span> <input name="paste_format" type="radio" id="ctype-text" value="text" onclick="pd.codeOps(true);pd.options(this);" disabled="disabled"/> <label for="ctype-text">Plain Text (diff only)</label></span></p><p id="csvcharp" style="display:none;"><strong>Separator</strong><span> <input id="csvchar" type="text" value="," onkeyup="pd.options(this);"/> <label for="csvchar">&mdash; Character sequence to separate list items. Default is comma.</label></span></p><p><strong>Input display</strong><span> <input name="diffdisplay" type="radio" onclick="pd.prettyvis(this);pd.options(this);" id="diffwide" checked="checked"/> <label for="diffwide">Orient Horizontally</label></span><span> <input name="diffdisplay" type="radio" onclick="pd.prettyvis(this);pd.options(this);" id="difftall"/> <label for="difftall">Orient Vertically</label></span></p><p><label class="label" for="option_comment">Pretty Diff Comment</label><textarea id="option_comment" readonly="readonly" rows="2" cols="30">/*prettydiff.com */</textarea></p></div><div id="diffops" class="options"><h2>Diff Options</h2><fieldset><legend>Diff Report Options</legend><p><strong>Print or Save Output</strong><span> <input id="diff-save" type="checkbox" onclick="pd.options(this);"/> <label for="diff-save">&mdash; Generates HTML report as raw text inside a text area.</label></span></p><p><label for="contextSize" class="label">Context size (optional)</label><span> <input onkeyup="pd.options(this);" id="contextSize" type="text" value=""/> <label for="contextSize">&mdash; This sets number of lines of code to pad the differences.</label></span></p><p><strong>Diff View Type</strong><span> <input onclick="pd.options(this);" name="_viewtype" checked="checked" id="sidebyside" type="radio"/> <label for="sidebyside">Side by Side View</label></span><span> <input onclick="pd.options(this);" name="_viewtype" id="inline" type="radio"/> <label for="inline">Inline View</label></span></p></fieldset><fieldset><legend>Difference Reduction Options</legend><p><strong>Diff Quotes</strong><span><input onclick="pd.options(this);" name="diffquote" checked="checked" id="diffquotey" type="radio"/><label for="diffquotey">Diff Quotes Literally</label></span><span><input onclick="pd.options(this);" name="diffquote" id="diffquoten" type="radio"/><label for="diffquoten">Normalize Single Quote Characters to Double Quote Characters</label></span></p><p><strong>Trailing Semicolons</strong><span><input onclick="pd.options(this);" name="diffscolon" checked="checked" id="diffscolony" type="radio"/><label for="diffscolony">Diff Semicolons</label></span><span><input onclick="pd.options(this);" name="diffscolon" id="diffscolonn" type="radio"/><label for="diffscolonn">Remove Trailing Semicolons</label></span></p></fieldset><fieldset id="diffbeautify"><legend>Beautification Options</legend><p id="diffquanp"><label for="diff-quan" class="label">Indentation Size</label><span> <input onkeyup="pd.options(this);" id="diff-quan" type="text" value="4"/> </span></p><p id="difftypep"><label for="diff-char" class="label">Indentation Character</label><span> <input onclick="pd.indentchar('diff-char');" onkeyup="pd.options(this);" type="text" id="diff-char" value="Click me for custom input" title="Accessibility Note:In order for this field to be accepted by the application the radio button labeled 'Indent with Other Characters' must be checked."/> </span><span id="diff-other-span"> <input onclick="pd.indentchar('');pd.options(this);" name="diffchar" id="diff-other" type="radio"/> <label for="diff-other">Indent with Other Characters</label></span><span> <input onclick="pd.indentchar('');pd.options(this);" name="diffchar" checked="checked" id="diff-space" type="radio"/> <label for="diff-space">Indent Space</label></span><span> <input onclick="pd.indentchar('');pd.options(this);" name="diffchar" id="diff-tab" type="radio"/> <label for="diff-tab">Indent Tab</label></span><span> <input onclick="pd.indentchar('');pd.options(this);" name="diffchar" id="diff-line" type="radio"/> <label for="diff-line">Indent New Line</label></span></p><p id="jsindentd"><strong>Style of Indent (JavaScript Only)</strong> <span> <input onclick="pd.options(this);" name="jsindentdiff" checked="checked" id="jsindentd-knr" type="radio"/> <label for="jsindentd-knr">K&amp;R Style</label></span> <span> <input onclick="pd.options(this);" name="jsindentdiff" id="jsindentd-all" type="radio"/> <label for="jsindentd-all">Allman (ANSI) Style &mdash; Sets opening curly braces on a new line.</label></span></p><p id="scriptindentd"><strong>Indent Style/Script (Markup Only)</strong><span> <input onclick="pd.options(this);" name="inscriptd" checked="checked" id="inscriptd-yes" type="radio"/> <label for="inscriptd-yes">Indent to Markup</label></span><span> <input onclick="pd.options(this);" name="inscriptd" id="inscriptd-no" type="radio"/> <label for="inscriptd-no">Indent Style/Script Independently</label></span></p><p id="htmlspecificd"><strong>Presume HTML (Markup Only)</strong><span> <input onclick="pd.options(this);" name="presumehtmld" checked="checked" id="htmld-no" type="radio"/> <label for="htmld-no">Not SGML type HTML</label></span><span> <input onclick="pd.options(this);" name="presumehtmld" id="htmld-yes" type="radio"/> <label for="htmld-yes">Presume SGML type HTML</label></span></p><p><strong>Ignore Content (Markup / JavaScript)</strong> <span> <input onclick="pd.options(this);" name="diffcontent" checked="checked" id="diffcontenty" type="radio"/> <label for="diffcontenty">Diff Content Literally</label></span><span> <input onclick="pd.options(this);" name="diffcontent" id="diffcontentn" type="radio"/> <label for="diffcontentn">Normalize Content and String Literals</label></span></p><p><strong>Force Indentation (Markup Only)</strong><span> <input onclick="pd.options(this);" name="dforce_indent" checked="checked" id="dforce_indent-no" type="radio"/> <label for="dforce_indent-no">Maintain code integrity</label></span><span> <input onclick="pd.options(this);" name="dforce_indent" id="dforce_indent-yes" type="radio"/><label for="dforce_indent-yes">Always force indentation</label></span></p></fieldset></div><div id="beauops" class="options" style="display:none;"><h2>Beautify Options</h2><fieldset><legend>Basic Options</legend><p><label for="beau-quan" class="label">Indentation Size</label><span> <input id="beau-quan" type="text" value="4" onkeyup="pd.options(this);"/> </span></p><p><label for="beau-char" class="label">Indentation Character</label><span> <input onclick="pd.indentchar('beau-char');" onkeyup="pd.options(this);" type="text" id="beau-char" value="Click me for custom input" title="Accessibility Note:In order for this field to be accepted by the application the radio button labeled 'Indent with Other Characters' must be checked."/> </span><span id="beau-other-span"> <input onclick="pd.indentchar('');pd.options(this);" name="beauchar" id="beau-other" type="radio"/> <label for="beau-other">Indent with Other Characters</label></span><span> <input onclick="pd.indentchar('');pd.options(this);" name="beauchar" checked="checked" id="beau-space" type="radio"/> <label for="beau-space">Indent Space</label></span><span> <input onclick="pd.indentchar('');pd.options(this);" name="beauchar" id="beau-tab" type="radio"/> <label for="beau-tab">Indent Tab</label></span><span> <input onclick="pd.indentchar('');pd.options(this);" name="beauchar" id="beau-line" type="radio"/> <label for="beau-line">Indent New Line</label></span></p></fieldset><fieldset><legend>Advanced Options</legend><p><strong>Indent Comments</strong><span> <input onclick="pd.options(this);" name="incomment" checked="checked" id="incomment-yes" type="radio"/> <label for="incomment-yes">Indent Comments</label></span><span> <input onclick="pd.options(this);" name="incomment" id="incomment-no" type="radio"/> <label for="incomment-no">No Comment Indentation</label></span></p><p id="jsindentb"><strong>Style of Indent (JavaScript Only)</strong> <span> <input onclick="pd.options(this);" name="jsindent" checked="checked" id="jsindent-knr" type="radio"/> <label for="jsindent-knr">K&amp;R Style</label></span> <span> <input onclick="pd.options(this);" name="jsindent" id="jsindent-all" type="radio"/> <label for="jsindent-all">Allman (ANSI) Style &mdash; Sets opening curly braces on a new line.</label></span></p><p id="scriptindent"><strong>Indent Style/Script (Markup Only)</strong><span> <input onclick="pd.options(this);" name="inscript" checked="checked" id="inscript-yes" type="radio"/> <label for="inscript-yes">Indent to Markup</label></span><span> <input onclick="pd.options(this);" name="inscript" id="inscript-no" type="radio"/> <label for="inscript-no">Indent Script/Style Independently</label></span></p><p id="htmlspecific"><strong>Presume HTML (Markup Only)</strong><span> <input onclick="pd.options(this);" name="presumehtml" checked="checked" id="html-no" type="radio"/> <label for="html-no">Not SGML type HTML</label></span><span> <input onclick="pd.options(this);" name="presumehtml" id="html-yes" type="radio"/> <label for="html-yes">Presume SGML type HTML</label></span></p><p><strong>Force Indentation (Markup Only)</strong><span> <input onclick="pd.options(this);" name="bforce_indent" checked="checked" id="bforce_indent-no" type="radio"/> <label for="bforce_indent-no">Maintain code integrity</label></span><span> <input onclick="pd.options(this);" name="bforce_indent" id="bforce_indent-yes" type="radio"/><label for="bforce_indent-yes">Always force indentation</label></span></p></fieldset></div><div id="miniops" style="display:none;" class="options"><h2>Minify Options</h2><p><strong>Presume HTML (Markup Only)</strong><span> <input onclick="pd.options(this);" name="presumehtmlm" checked="checked" id="htmlm-no" type="radio"/> <label for="htmlm-no">Not SGML type HTML</label></span><span> <input onclick="pd.options(this);" name="presumehtmlm" id="htmlm-yes" type="radio"/> <label for="htmlm-yes">Presume SGML type HTML</label></span></p><p><strong>Top Comments (JavaScript / CSS)</strong><span> <input onclick="pd.options(this);" name="topcoms" checked="checked" id="topcoms-no" type="radio"/> <label for="topcoms-no">Minify all comments</label></span><span> <input onclick="pd.options(this);" name="topcoms" id="topcoms-yes" type="radio"/> <label for="topcoms-yes">Preserve comments before any code</label></span></p></div><div> <p class="button"><button value="Execute" onclick="recycle();" type="button">Execute</button></p><div id="diffreport" class="box"><p style="display:none" class="buttons"> <button class="save" onclick="pd.save(this);" title="Convert diff report to text that can be saved.">S</button> <button class="minimize" onclick="pd.minimize(this);" title="Minimize this dialogue ">&uarr;</button> <button class="maximize" onclick="pd.maximize(this);" title="Maximize this dialogue to the browser window.">&uarr;</button> <button class="resize" onmousedown="pd.resize(event, this);" title="Resize this dialogue.">&harr;</button></p> <h2 class="heading" onmousedown="pd.grab(event, this);" title="Grab this title element to move this dialogue around the screen."><span>Diff Report</span></h2><div style="display:none" class="body" id="diffreportbody" onclick="pd.top(this.parentNode);pd.options(this.parentNode)"></div></div><div id="beaureport" class="box"><p style="display:none" class="buttons"> <button class="minimize" onclick="pd.minimize(this);" title="Minimize this dialogue ">&uarr;</button> <button class="maximize" onclick="pd.maximize(this);" title="Maximize this dialogue to the browser window.">&uarr;</button> <button class="resize" onmousedown="pd.resize(event, this);" title="Resize this dialogue.">&harr;</button></p> <h2 class="heading" onmousedown="pd.grab(event, this);" title="Grab this title element to move this dialogue around the screen."><span>Beautify Report</span></h2><div style="display:none" class="body" id="beaureportbody" onclick="pd.top(this.parentNode);pd.options(this.parentNode)"></div></div><div id="minreport" class="box"><p style="display:none" class="buttons"> <button class="minimize" onclick="pd.minimize(this);" title="Minimize this dialogue ">&uarr;</button> <button class="maximize" onclick="pd.maximize(this);" title="Maximize this dialogue to the browser window.">&uarr;</button> <button class="resize" onmousedown="pd.resize(event, this);" title="Resize this dialogue.">&harr;</button></p> <h2 class="heading" onmousedown="pd.grab(event, this);" title="Grab this title element to move this dialogue around the screen."><span>Minify Report</span></h2><div style="display:none" class="body" id="minreportbody" onclick="pd.top(this.parentNode);pd.options(this.parentNode)"></div></div><div id="statreport" class="box"><p style="display:none" class="buttons"> <button class="minimize" onclick="pd.minimize(this);" title="Minimize this dialogue ">&uarr;</button> <button class="maximize" onclick="pd.maximize(this);" title="Maximize this dialogue to the browser window.">&uarr;</button> <button class="resize" onmousedown="pd.resize(event, this);" title="Resize this dialogue.">&harr;</button></p> <h2 class="heading" onmousedown="pd.grab(event, this);" title="Grab this title element to move this dialogue around the screen."><span>Usage Statistics</span></h2><div style="display:none" class="body" id="statreportbody" onclick="pd.top(this.parentNode);pd.options(this.parentNode)"><div><h3>General statistics</h3><ul><li>Total number of visits: <strong id="stvisit">0</strong></li><li>Total usage count: <strong id="stusage">0</strong></li><li>Date of first visit: <strong id="stfdate"></strong></li><li>Average visits per day: <strong id="stavday">0</strong></li></ul></div><div><h3>Usage statistics</h3><ul><li>Diff: <strong id="stdiff">0</strong></li><li>Beautification: <strong id="stbeau">0</strong></li><li>Minification: <strong id="stminn">0</strong></li></ul></div><div><h3>Language statistics</h3><ul><li>Markup: <strong id="stmarkup">0</strong></li><li>JavaScript: <strong id="stjs">0</strong></li><li>CSS: <strong id="stcss">0</strong></li><li>CSV: <strong id="stcsv">0</strong></li><li>Plain text: <strong id="sttext">0</strong></li></ul></div></div></div><div id="diffoutput"><p id="emailme">Please send comments, feedback, and requests to <a href="mailto:austin.cheney@us.army.mil">austin.cheney@us.army.mil</a>.</p><p>Created by <a href="http://mailmarkup.org/">Austin Cheney</a> on 3 Mar 2009. This is a heavy modification of JavaScript tools: <a href="http://snowtide.com/files/media/jsdifflib/jsdifflibtest.html">jsdifflib</a>, <a href="http://www.crockford.com/javascript/jsmin.html">jsmin</a> in <a href="http://fmarcia.info/jsmin/">JavaScript</a>, <a href="http://tools.arantius.com/tabifier">cleanCSS</a>, <a href="http://prettydiff.com/">markupmin</a>, <a href="http://prettydiff.com/">markup_beauty</a>, <a href="http://prettydiff.com/">csvbeauty</a>, <a href="http://prettydiff.com/">csvmin</a>, <a href="http://prettydiff.com/">charDecoder</a>, and <a href="http://jsbeautifier.org/">jsbeautify</a>.</p><p>Pretty Diff is used by these great organizations:</p><ul id="thirdparties"> <li><a href="http://www.w3.org/"><img src="images/logo_w3c.gif" alt="World Wide Web Consortium"/></a></li> <li><a href="http://www.travelocity.com/"><img src="images/logo_travelocity.gif" alt="Travelocity"/></a></li> </ul></div></div><script type="application/javascript" src="pd-min.js"></script><script type="application/javascript" src="prettydiff-min.js"></script></body></html>
Jump to Line
Something went wrong with that request. Please try again.