2016-08-23 17:20:54 +00:00
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html lang="en" class="js">
|
|
|
|
|
<head>
|
|
|
|
|
<meta charset="utf-8">
|
|
|
|
|
<!--[if IE]>
|
|
|
|
|
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'/>
|
|
|
|
|
<![endif]-->
|
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
|
|
|
|
|
|
|
<meta name="description" content="Diff parser and pretty html generator">
|
|
|
|
|
<meta name="keywords" content="diff2html,git,diff,unified,pretty,html,css,javaccript">
|
|
|
|
|
<meta name="author" content="Rodrigo Fernandes (rtfpessoa)">
|
|
|
|
|
|
|
|
|
|
<title>diff2html</title>
|
|
|
|
|
|
|
|
|
|
<!-- search engine -->
|
|
|
|
|
<link rel="canonical" href="https://diff2html.xyz">
|
|
|
|
|
|
|
|
|
|
<!-- open graph -->
|
|
|
|
|
<meta property="og:title" content="diff2html">
|
|
|
|
|
<meta property="og:type" content="website">
|
|
|
|
|
|
|
|
|
|
<meta property="og:description"
|
|
|
|
|
content="Diff parser and pretty html generator.">
|
|
|
|
|
|
|
|
|
|
<meta property="og:url" content="https://diff2html.xyz">
|
|
|
|
|
<meta property="og:site_name" content="diff2html">
|
|
|
|
|
|
|
|
|
|
<!-- Bootstrap -->
|
|
|
|
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"
|
|
|
|
|
integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
|
|
|
|
|
|
|
|
|
|
<!-- Custom styles for this template -->
|
|
|
|
|
<link href="main.css" rel="stylesheet">
|
|
|
|
|
|
|
|
|
|
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.6.0/styles/github.min.css">
|
|
|
|
|
|
|
|
|
|
<!-- diff2html -->
|
|
|
|
|
<link rel="stylesheet" type="text/css" href="assets/diff2html.css">
|
|
|
|
|
<!-- -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
|
|
|
|
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
|
|
|
|
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
|
|
|
|
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
|
|
|
|
|
|
|
|
|
ga('create', 'UA-78351861-2', 'auto');
|
|
|
|
|
ga('send', 'pageview');
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
</head>
|
|
|
|
|
<body class="swag-line template-index">
|
|
|
|
|
<div class="container-overflow-wrap">
|
|
|
|
|
|
|
|
|
|
<div class="container">
|
|
|
|
|
<nav class="navbar navbar-default navbar-tall navbar-full" role="navigation">
|
|
|
|
|
<div class="navbar-header">
|
|
|
|
|
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#global-nav">
|
|
|
|
|
<span class="sr-only">Toggle navigation</span>
|
|
|
|
|
<span class="icon-bar"></span>
|
|
|
|
|
<span class="icon-bar"></span>
|
|
|
|
|
<span class="icon-bar"></span>
|
|
|
|
|
</button>
|
|
|
|
|
<a class="navbar-brand" href="index.html">diff2html</a>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="collapse navbar-collapse" id="global-nav">
|
|
|
|
|
<div class="navbar-right">
|
|
|
|
|
<ul class="nav navbar-nav">
|
|
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
<a href="index.html#install">Getting Started</a>
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
<a href="index.html#cli">CLI</a>
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
<a href="demo.html">Demo</a>
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
<a href="https://github.com/rtfpessoa/diff2html#how-to-use" target="_blank">Docs</a>
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
<a href="https://github.com/rtfpessoa/diff2html/issues/new" target="_blank">Support</a>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</nav>
|
|
|
|
|
|
|
|
|
|
<h1>Line by Line</h1>
|
|
|
|
|
|
|
|
|
|
<div id="line-by-line" style="margin: 0 auto;">
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<h1>Side by Side</h1>
|
|
|
|
|
|
|
|
|
|
<div id="side-by-side" style="margin: 0 auto;">
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<footer class="footer clearfix">
|
|
|
|
|
<p class="col-xs-10 col-xs-offset-1">
|
|
|
|
|
Website originally designed and built by
|
|
|
|
|
<a href="https://twitter.com/mdo" target="_blank">@mdo</a>,
|
|
|
|
|
<a href="https://twitter.com/fat" target="_blank">@fat</a>, and
|
|
|
|
|
<a href="https://twitter.com/dhg" target="_blank">@dhg</a>,
|
|
|
|
|
adapted with <span class="hero-red">❤</span> by
|
|
|
|
|
<a href="https://twitter.com/rtfpessoa" target="_blank">@rtfpessoa</a>.
|
|
|
|
|
</p>
|
|
|
|
|
<ul class="footer-list col-xs-10 col-xs-offset-1">
|
|
|
|
|
|
|
|
|
|
<li class="footer-list-item">
|
|
|
|
|
<a class="footer-list-link" href="https://github.com/rtfpessoa/diff2html#how-to-use"
|
|
|
|
|
target="_blank">FAQ</a>
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
<li class="footer-list-item">
|
|
|
|
|
<a class="footer-list-link" href="https://diff2html.xyz">diff2html</a>
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
|
</footer>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- General JavaScript -->
|
|
|
|
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.3/jquery.min.js"></script>
|
|
|
|
|
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"
|
|
|
|
|
integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS"
|
|
|
|
|
crossorigin="anonymous"></script>
|
|
|
|
|
|
|
|
|
|
<script type="application/ld+json">
|
|
|
|
|
{
|
|
|
|
|
"@context": "http://schema.org/",
|
|
|
|
|
"@type": "SoftwareSourceCode",
|
|
|
|
|
"name": "diff2html",
|
|
|
|
|
"author": "Rodrigo Fernandes",
|
|
|
|
|
"image": "https://diff2html.xyz/img/snapshot-3.png",
|
|
|
|
|
"description": "Diff parser and pretty html generator.",
|
|
|
|
|
"codeRepository": "https://github.com/rtfpessoa/diff2html",
|
|
|
|
|
"programmingLanguage": "JavaScript",
|
|
|
|
|
"runtimePlatform": "Node >= 0.12",
|
|
|
|
|
"mainEntityOfPage": "https://diff2html.xyz/"
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.6.0/highlight.min.js"></script>
|
|
|
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.6.0/languages/scala.min.js"></script>
|
|
|
|
|
|
|
|
|
|
<!-- diff2html -->
|
|
|
|
|
<script type="text/javascript" src="assets/diff2html.js"></script>
|
|
|
|
|
<script type="text/javascript" src="assets/diff2html-ui.js"></script>
|
|
|
|
|
<!-- -->
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
var lineDiffExample =
|
|
|
|
|
"--- a/src/my/really/big/path/sample.js\n" +
|
|
|
|
|
"+++ b/src/my/small/path/sample.js\n" +
|
|
|
|
|
"@@ -1 +1,2 @@\n" +
|
|
|
|
|
"-test\n" +
|
|
|
|
|
"+test1r\n" +
|
|
|
|
|
"+test2r\n" +
|
|
|
|
|
'diff --git a/src/core/init.java b/src/core/init.java\n' +
|
|
|
|
|
'index e49196a..50f310c 100644\n' +
|
|
|
|
|
'--- a/src/core/init.java\n' +
|
|
|
|
|
'+++ b/src/core/init.java\n' +
|
|
|
|
|
'@@ -101,7 +101,7 @@\n' +
|
|
|
|
|
' /**\n' +
|
|
|
|
|
' * Setter for property filesize.\n' +
|
|
|
|
|
' *\n' +
|
|
|
|
|
" * @param filesize value of property 'filesize'.\n" +
|
|
|
|
|
' */\n' +
|
|
|
|
|
' public void setFilesize(int filesize) {\n' +
|
|
|
|
|
'- this.filesizeOld = filesizeOld;\n' +
|
|
|
|
|
'+ this.filesizeNew = filesizeNew;\n' +
|
|
|
|
|
' }\n' +
|
|
|
|
|
'diff --git a/src/very/long/file/path/src/very/long/file/path/src/very/long/file/path/src/very/long/file/path/src/very/long/file/path/src/very/long/file/path/src/very/long/file/path/src/very/long/file/path/src/very/long/file/path/src/very/long/file/path/coverage.init b/src/very/long/file/path/src/very/long/file/path/src/very/long/file/path/src/very/long/file/path/src/very/long/file/path/src/very/long/file/path/src/very/long/file/path/src/very/long/file/path/src/very/long/file/path/src/very/long/file/path/coverage.init\n' +
|
|
|
|
|
'index fc56817..e8e7e49 100644\n' +
|
|
|
|
|
'--- a/src/very/long/file/path/src/very/long/file/path/src/very/long/file/path/src/very/long/file/path/src/very/long/file/path/src/very/long/file/path/src/very/long/file/path/src/very/long/file/path/src/very/long/file/path/src/very/long/file/path/coverage.init\n' +
|
|
|
|
|
'+++ b/src/very/long/file/path/src/very/long/file/path/src/very/long/file/path/src/very/long/file/path/src/very/long/file/path/src/very/long/file/path/src/very/long/file/path/src/very/long/file/path/src/very/long/file/path/src/very/long/file/path/coverage.init\n' +
|
|
|
|
|
'@@ -19,7 +19,7 @@\n' +
|
|
|
|
|
' -opt "\-nostart"\n' +
|
|
|
|
|
' \n' +
|
|
|
|
|
' # skip stopenv\n' +
|
|
|
|
|
'--do "runbvt,stopenv,getlogs,pullcoveragedata,stopenv,getlogs,pullcoveragedata,stopenv,getlogs,pullcoveragedata,stopenv,getlogs,pullcoveragedata,stopenv,getlogs,pullcoveragedata,stopenv,getlogs,pullcoveragedata,stopenv,getlogs,pullcoveragedata,stopenv,getlogs,pullcoveragedata,stopenv,getlogs,pullcoveragedata,stopenv,getlogs,pullcoveragedata"\n' +
|
|
|
|
|
'+-do "runbvt,getlogs,pullcoveragedata"\n' +
|
|
|
|
|
' \n' +
|
|
|
|
|
' ##########################################\n' +
|
|
|
|
|
' # logs files to bring back to base\n' +
|
|
|
|
|
'diff --git a/src/attributes/attr.js b/src/attributes/attr.js\n' +
|
|
|
|
|
'index facdd41..b627fe8 100644\n' +
|
|
|
|
|
'--- a/src/attributes/attr.js\n' +
|
|
|
|
|
'+++ b/src/attributes/attr.js\n' +
|
|
|
|
|
'@@ -1,11 +1,10 @@\n' +
|
|
|
|
|
' define([\n' +
|
|
|
|
|
' "../core",\n' +
|
|
|
|
|
' "../var/rnotwhite",\n' +
|
|
|
|
|
'- "../var/strundefined",\n' +
|
|
|
|
|
' "../core/access",\n' +
|
|
|
|
|
' "./support",\n' +
|
|
|
|
|
' "../selector"\n' +
|
|
|
|
|
'-], function( jQuery, rnotwhite, strundefined, access, support ) {\n' +
|
|
|
|
|
'+], function( jQuery, rnotwhite, access, support ) {\n' +
|
|
|
|
|
' \n' +
|
|
|
|
|
' var nodeHook, boolHook,\n' +
|
|
|
|
|
' attrHandle = jQuery.expr.attrHandle;\n' +
|
|
|
|
|
'@@ -33,7 +32,7 @@ jQuery.extend({\n' +
|
|
|
|
|
' }\n' +
|
|
|
|
|
' \n' +
|
|
|
|
|
' // Fallback to prop when attributes are not supported\n' +
|
|
|
|
|
'- if ( typeof elem.getAttribute === strundefined ) {\n' +
|
|
|
|
|
'+ if ( !elem.getAttribute ) {\n' +
|
|
|
|
|
' return jQuery.prop( elem, name, value );\n' +
|
|
|
|
|
' }\n' +
|
|
|
|
|
' \n' +
|
|
|
|
|
'diff --git a/src/attributes/classes.js b/src/attributes/classes.js\n' +
|
|
|
|
|
'index c617824..c8d1393 100644\n' +
|
|
|
|
|
'--- a/src/attributes/classes.js\n' +
|
|
|
|
|
'+++ b/src/attributes/classes.js\n' +
|
|
|
|
|
'@@ -1,10 +1,9 @@\n' +
|
|
|
|
|
' define([\n' +
|
|
|
|
|
' "../core",\n' +
|
|
|
|
|
' "../var/rnotwhite",\n' +
|
|
|
|
|
'- "../var/strundefined",\n' +
|
|
|
|
|
' "../data/var/dataPriv",\n' +
|
|
|
|
|
' "../core/init"\n' +
|
|
|
|
|
'-], function( jQuery, rnotwhite, strundefined, dataPriv ) {\n' +
|
|
|
|
|
'+], function( jQuery, rnotwhite, dataPriv ) {\n' +
|
|
|
|
|
' \n' +
|
|
|
|
|
' var rclass = /[\\t\\r\\n\\f]/g;\n' +
|
|
|
|
|
' \n' +
|
|
|
|
|
'@@ -128,7 +127,7 @@ jQuery.fn.extend({\n' +
|
|
|
|
|
' }\n' +
|
|
|
|
|
' \n' +
|
|
|
|
|
' // Toggle whole class name\n' +
|
|
|
|
|
'- } else if ( type === strundefined || type === "boolean" ) {\n' +
|
|
|
|
|
'+ } else if ( value === undefined || type === "boolean" ) {\n' +
|
|
|
|
|
' if ( this.className ) {\n' +
|
|
|
|
|
' // store className if set\n' +
|
|
|
|
|
' dataPriv.set( this, "__className__", this.className );\n' +
|
|
|
|
|
'diff --git a/src/core/init.js b/src/core/init.js\n' +
|
|
|
|
|
'index e49196a..50f310c 100644\n' +
|
|
|
|
|
'--- a/src/core/init.js\n' +
|
|
|
|
|
'+++ b/src/core/init.js\n' +
|
|
|
|
|
'@@ -101,7 +101,7 @@ var rootjQuery,\n' +
|
|
|
|
|
' // HANDLE: $(function)\n' +
|
|
|
|
|
' // Shortcut for document ready\n' +
|
|
|
|
|
' } else if ( jQuery.isFunction( selector ) ) {\n' +
|
|
|
|
|
'- return typeof rootjQuery.ready !== "undefined" ?\n' +
|
|
|
|
|
'+ return rootjQuery.ready !== undefined ?\n' +
|
|
|
|
|
' rootjQuery.ready( selector ) :\n' +
|
|
|
|
|
' // Execute immediately if ready is not present\n' +
|
|
|
|
|
' selector( jQuery );\n' +
|
|
|
|
|
'diff --git a/src/event.js b/src/event.js\n' +
|
|
|
|
|
'index 7336f4d..6183f70 100644\n' +
|
|
|
|
|
'--- a/src/event.js\n' +
|
|
|
|
|
'+++ b/src/event.js\n' +
|
|
|
|
|
'@@ -1,6 +1,5 @@\n' +
|
|
|
|
|
' define([\n' +
|
|
|
|
|
' "./core",\n' +
|
|
|
|
|
'- "./var/strundefined",\n' +
|
|
|
|
|
' "./var/rnotwhite",\n' +
|
|
|
|
|
' "./var/hasOwn",\n' +
|
|
|
|
|
' "./var/slice",\n' +
|
|
|
|
|
'@@ -10,7 +9,7 @@ define([\n' +
|
|
|
|
|
' "./core/init",\n' +
|
|
|
|
|
' "./data/accepts",\n' +
|
|
|
|
|
' "./selector"\n' +
|
|
|
|
|
'-], function( jQuery, strundefined, rnotwhite, hasOwn, slice, support, dataPriv ) {\n' +
|
|
|
|
|
'+], function( jQuery, rnotwhite, hasOwn, slice, support, dataPriv ) {\n' +
|
|
|
|
|
' \n' +
|
|
|
|
|
' var\n' +
|
|
|
|
|
' rkeyEvent = /^key/,\n' +
|
|
|
|
|
'@@ -72,7 +71,7 @@ jQuery.event = {\n' +
|
|
|
|
|
' eventHandle = elemData.handle = function( e ) {\n' +
|
|
|
|
|
' // Discard the second event of a jQuery.event.trigger() and\n' +
|
|
|
|
|
' // when an event is called after a page has unloaded\n' +
|
|
|
|
|
'- return typeof jQuery !== strundefined && jQuery.event.triggered !== e.type ?\n' +
|
|
|
|
|
'+ return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ?\n' +
|
|
|
|
|
' jQuery.event.dispatch.apply( elem, arguments ) : undefined;\n' +
|
|
|
|
|
' };\n' +
|
|
|
|
|
' }\n' +
|
|
|
|
|
'diff --git a/src/exports/global.js b/src/exports/global.js\n' +
|
|
|
|
|
'index 6513287..1db4144 100644\n' +
|
|
|
|
|
'--- a/src/exports/global.js\n' +
|
|
|
|
|
'+++ b/src/exports/global.js\n' +
|
|
|
|
|
'@@ -1,7 +1,9 @@\n' +
|
|
|
|
|
' define([\n' +
|
|
|
|
|
'- "../core",\n' +
|
|
|
|
|
'- "../var/strundefined"\n' +
|
|
|
|
|
'-], function( jQuery, strundefined ) {\n' +
|
|
|
|
|
'+ "../core"\n' +
|
|
|
|
|
'+], function( jQuery ) {\n' +
|
|
|
|
|
'+\n' +
|
|
|
|
|
'+/* exported noGlobal */\n' +
|
|
|
|
|
'+/* global noGlobal: false */\n' +
|
|
|
|
|
' \n' +
|
|
|
|
|
' var\n' +
|
|
|
|
|
' // Map over jQuery in case of overwrite\n' +
|
|
|
|
|
'@@ -25,7 +27,7 @@ jQuery.noConflict = function( deep ) {\n' +
|
|
|
|
|
' // Expose jQuery and $ identifiers, even in AMD\n' +
|
|
|
|
|
' // (#7102#comment:10, https://github.com/jquery/jquery/pull/557)\n' +
|
|
|
|
|
' // and CommonJS for browser emulators (#13566)\n' +
|
|
|
|
|
'-if ( typeof noGlobal === strundefined ) {\n' +
|
|
|
|
|
'+if ( !noGlobal ) {\n' +
|
|
|
|
|
' window.jQuery = window.$ = jQuery;\n' +
|
|
|
|
|
' }\n' +
|
|
|
|
|
' \n' +
|
|
|
|
|
'diff --git a/src/offset.js b/src/offset.js\n' +
|
|
|
|
|
'index cc6ffb4..fa51f18 100644\n' +
|
|
|
|
|
'--- a/src/offset.js\n' +
|
|
|
|
|
'+++ b/src/offset.js\n' +
|
|
|
|
|
'@@ -1,6 +1,5 @@\n' +
|
|
|
|
|
' define([\n' +
|
|
|
|
|
' "./core",\n' +
|
|
|
|
|
'- "./var/strundefined",\n' +
|
|
|
|
|
' "./core/access",\n' +
|
|
|
|
|
' "./css/var/rnumnonpx",\n' +
|
|
|
|
|
' "./css/curCSS",\n' +
|
|
|
|
|
'@@ -10,7 +9,7 @@ define([\n' +
|
|
|
|
|
' "./core/init",\n' +
|
|
|
|
|
' "./css",\n' +
|
|
|
|
|
' "./selector" // contains\n' +
|
|
|
|
|
'-], function( jQuery, strundefined, access, rnumnonpx, curCSS, addGetHookIf, support ) {\n' +
|
|
|
|
|
'+], function( jQuery, access, rnumnonpx, curCSS, addGetHookIf, support ) {\n' +
|
|
|
|
|
' \n' +
|
|
|
|
|
' var docElem = window.document.documentElement;\n' +
|
|
|
|
|
' \n' +
|
|
|
|
|
'@@ -99,7 +98,7 @@ jQuery.fn.extend({\n' +
|
|
|
|
|
' \n' +
|
|
|
|
|
' // Support: BlackBerry 5, iOS 3 (original iPhone)\n' +
|
|
|
|
|
' // If we dont have gBCR, just use 0,0 rather than error\n' +
|
|
|
|
|
'- if ( typeof elem.getBoundingClientRect !== strundefined ) {\n' +
|
|
|
|
|
'+ if ( elem.getBoundingClientRect !== undefined ) {\n' +
|
|
|
|
|
' box = elem.getBoundingClientRect();\n' +
|
|
|
|
|
' }\n' +
|
|
|
|
|
' win = getWindow( doc );\n' +
|
|
|
|
|
'diff --git a/src/var/strundefined.js b/src/var/strundefined.js\n' +
|
|
|
|
|
'deleted file mode 100644\n' +
|
|
|
|
|
'index 04e16b0..0000000\n' +
|
|
|
|
|
'--- a/src/var/strundefined.js\n' +
|
|
|
|
|
'+++ /dev/null\n' +
|
|
|
|
|
'@@ -1,3 +0,0 @@\n' +
|
|
|
|
|
'-define(function() {\n' +
|
|
|
|
|
'- return typeof undefined;\n' +
|
|
|
|
|
'-});\n' +
|
|
|
|
|
'diff --git a/components/textdiff/textdiff.html b/components/textdiff/textdiff.html\n' +
|
|
|
|
|
'index a3484bf..82209af 100644\n' +
|
|
|
|
|
'--- a/components/textdiff/textdiff.html\n' +
|
|
|
|
|
'+++ b/components/textdiff/textdiff.html\n' +
|
|
|
|
|
'@@ -1,6 +1,8 @@\n' +
|
|
|
|
|
' <!-- ko if: isShowingDiffs -->\n' +
|
|
|
|
|
' <div>\n' +
|
|
|
|
|
'- <div data-bind="event: { load: setDom($element) }"></div>\n' +
|
|
|
|
|
'+ <!-- ko if: isParsed -->\n' +
|
|
|
|
|
'+ <div data-bind="template: {nodes: ko.utils.parseHtmlFragment(htmlSrc())}"></div>\n' +
|
|
|
|
|
'+ <!-- /ko -->\n' +
|
|
|
|
|
' <div class="btn-load-more" data-bind="visible: loadMoreCount() > 0">\n' +
|
|
|
|
|
' </div>\n' +
|
|
|
|
|
'diff --git a/test.js b/test.js\n' +
|
|
|
|
|
'new file mode 100644\n' +
|
|
|
|
|
'index 0000000..e1e22ec\n' +
|
|
|
|
|
'--- /dev/null\n' +
|
|
|
|
|
'+++ b/test.js\n' +
|
|
|
|
|
'@@ -0,0 +1,6 @@\n' +
|
|
|
|
|
"+var parser = require('./source/git-parser');\n" +
|
|
|
|
|
'+\n' +
|
|
|
|
|
"+var text = 'diff --git a/components/app/app.html b/components/app/app.html\\nindex ecb7a95..027bd9b 100644\\n--- a/components/app/app.html\\n+++ b/components/app/app.html\\n@@ -52,0 +53,3 @@\\n+\\n+\\n+\\n@@ -56,0 +60,3 @@\\n+\\n+\\n+\\n'\n" +
|
|
|
|
|
'+var patchLineList = [ false, false, false, false ];\n' +
|
|
|
|
|
'+\n' +
|
|
|
|
|
'+console.log(parser.parsePatchDiffResult(text, patchLineList));\n' +
|
|
|
|
|
"diff --git a/a.xml b/b.xml\n" +
|
|
|
|
|
"index e54317e..82a9a56 100644\n" +
|
|
|
|
|
"--- a/a.xml\n" +
|
|
|
|
|
"+++ b/b.xml\n" +
|
|
|
|
|
"@@ -242,4 +242,6 @@ need to create a new job for native server java api and move these tests to a ne\n" +
|
|
|
|
|
" </packages>\n" +
|
|
|
|
|
" </test>\n" +
|
|
|
|
|
" -->\n" +
|
|
|
|
|
"+\n" +
|
2016-09-10 12:53:51 +00:00
|
|
|
"+\n";
|
2016-08-23 17:20:54 +00:00
|
|
|
|
|
|
|
|
$(document).ready(function() {
|
|
|
|
|
var diff2htmlUi = new Diff2HtmlUI({diff: lineDiffExample});
|
|
|
|
|
|
|
|
|
|
diff2htmlUi.draw('#line-by-line', {
|
|
|
|
|
inputFormat: 'json',
|
|
|
|
|
showFiles: true,
|
|
|
|
|
matching: 'lines'
|
|
|
|
|
});
|
|
|
|
|
diff2htmlUi.fileListCloseable('#line-by-line', false);
|
|
|
|
|
diff2htmlUi.highlightCode('#line-by-line');
|
|
|
|
|
|
|
|
|
|
diff2htmlUi.draw('#side-by-side', {
|
|
|
|
|
inputFormat: 'json',
|
|
|
|
|
showFiles: true,
|
|
|
|
|
matching: 'lines',
|
|
|
|
|
outputFormat: 'side-by-side',
|
|
|
|
|
synchronisedScroll: true
|
|
|
|
|
});
|
|
|
|
|
diff2htmlUi.fileListCloseable('#side-by-side', false);
|
|
|
|
|
diff2htmlUi.highlightCode('#side-by-side');
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|