From 747bcacf2cba1b5198368bfc38bd3516f1aae67f Mon Sep 17 00:00:00 2001 From: Jamie Peabody Date: Thu, 29 Apr 2021 20:09:10 +0100 Subject: [PATCH 1/2] patch(#147): fixes selected change style issue (#148) Co-authored-by: Jamie Peabody --- CHANGES.md | 3 +++ package.json | 2 +- src/mergely.js | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index b51d909..9ca734f 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,8 @@ # Changes +## 4.2.3 +* patch: fixes [#147](https://github.com/wickedest/Mergely/issues/147). Fixes the css style for the currently selected change. + ## 4.2.2: * patch: fixes issue where initial change was not being set causing next/prev and merge actions to not work as expected. diff --git a/package.json b/package.json index 79889c6..25f8add 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mergely", - "version": "4.2.2", + "version": "4.2.3", "description": "A javascript UI for diff/merge", "directories": { "doc": "doc", diff --git a/src/mergely.js b/src/mergely.js index 5e2f76a..2fd7c13 100644 --- a/src/mergely.js +++ b/src/mergely.js @@ -1473,8 +1473,8 @@ jQuery.extend(Mgly.CodeMirrorDiffView.prototype, { // gutter markup that highlights all gutter line numbers for the current change. // cm doesn't give us the ability to style the line numbers directly. - var lhsLineNumbers = jQuery('#mergely-lhs ~ .CodeMirror .CodeMirror-code .CodeMirror-linenumber.CodeMirror-gutter-elt'); - var rhsLineNumbers = jQuery('#mergely-rhs ~ .CodeMirror .CodeMirror-code .CodeMirror-linenumber.CodeMirror-gutter-elt'); + var lhsLineNumbers = jQuery('#' + this.id + '-lhs ~ .CodeMirror .CodeMirror-code .CodeMirror-linenumber.CodeMirror-gutter-elt'); + var rhsLineNumbers = jQuery('#' + this.id + '-rhs ~ .CodeMirror .CodeMirror-code .CodeMirror-linenumber.CodeMirror-gutter-elt'); var jf, jt, i, j; rhsLineNumbers.removeClass('mergely current'); lhsLineNumbers.removeClass('mergely current'); From d2c41d1ee1ded8fcb1b43d5d234e911f14a6cf8c Mon Sep 17 00:00:00 2001 From: Jamie Peabody Date: Thu, 29 Apr 2021 20:24:21 +0100 Subject: [PATCH 2/2] patch(#142): added examples README.md --- CHANGES.md | 3 +++ examples/README.md | 32 ++++++++++++++++++++++++++++++++ package.json | 2 +- 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 examples/README.md diff --git a/CHANGES.md b/CHANGES.md index 9ca734f..fa86955 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,8 @@ # Changes +## 4.2.4 +* patch: fixes [#142](https://github.com/wickedest/Mergely/issues/142). Added README.md to examples. + ## 4.2.3 * patch: fixes [#147](https://github.com/wickedest/Mergely/issues/147). Fixes the css style for the currently selected change. diff --git a/examples/README.md b/examples/README.md new file mode 100644 index 0000000..3d58237 --- /dev/null +++ b/examples/README.md @@ -0,0 +1,32 @@ +# Mergely examples + +To run these examples, you need to run: + +```bash +$ npm start +``` + +This runs Mergely in a hot dev-server for development. + +## Main example +http://localhost:8080 + +Shows basic functionality. + +## Ajax example + +http://localhost:8080/examples/ajax.html + +Who still says "ajax" these days? Anyway, this example demonstrates how to load your left-hand and right-hand sources from external URL, and also how to skin your own editor, and provide drop-file functionality. + +## Simple example + +This example demonstrates how to load your left-hand and right-hand sources from static text. + +http://localhost:8080/examples/simple.html + +## Size example + +This example demonstrates how to size your editors, and also how to have multiple editors on the same page. + +http://localhost:8080/examples/size.html diff --git a/package.json b/package.json index 25f8add..991030f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mergely", - "version": "4.2.3", + "version": "4.2.4", "description": "A javascript UI for diff/merge", "directories": { "doc": "doc",