mirror of
https://github.com/wickedest/Mergely.git
synced 2026-04-01 10:18:36 +08:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e1db3c4f9e | ||
|
|
5e4dfc9e78 | ||
|
|
827487a598 |
@@ -1,3 +1,10 @@
|
|||||||
|
# [5.1.0](https://github.com/wickedest/Mergely/compare/v5.0.4...v5.1.0) (2023-08-27)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* support CM modes: go, javascript, htmlmixed, markdown, python ([827487a](https://github.com/wickedest/Mergely/commit/827487a5983cb89ef41415435d44239e35983b9a))
|
||||||
|
|
||||||
## [5.0.4](https://github.com/wickedest/Mergely/compare/v5.0.3...v5.0.4) (2023-08-27)
|
## [5.0.4](https://github.com/wickedest/Mergely/compare/v5.0.3...v5.0.4) (2023-08-27)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
10
README.md
10
README.md
@@ -82,6 +82,16 @@ Mergely will emit an `updated` event when the editor is first initialized, and e
|
|||||||
</body>
|
</body>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Visualization modes
|
||||||
|
|
||||||
|
Mergely supports the following CodeMirror visualizations for [mode](codemirror.net/5/doc/manual.html#option_mode):
|
||||||
|
|
||||||
|
* go
|
||||||
|
* javascript
|
||||||
|
* htmlmixed
|
||||||
|
* markdown
|
||||||
|
* python
|
||||||
|
|
||||||
## Options
|
## Options
|
||||||
|
|
||||||
|Option|Type|Default value|Description|
|
|Option|Type|Default value|Description|
|
||||||
|
|||||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "mergely",
|
"name": "mergely",
|
||||||
"version": "5.0.4",
|
"version": "5.1.0",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "mergely",
|
"name": "mergely",
|
||||||
"version": "5.0.4",
|
"version": "5.1.0",
|
||||||
"license": "(GPL-3.0 OR LGPL-3.0 OR MPL-1.1 OR SEE LICENSE IN LICENSE)",
|
"license": "(GPL-3.0 OR LGPL-3.0 OR MPL-1.1 OR SEE LICENSE IN LICENSE)",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.1.6",
|
"@babel/core": "^7.1.6",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "mergely",
|
"name": "mergely",
|
||||||
"version": "5.0.4",
|
"version": "5.1.0",
|
||||||
"description": "A javascript UI for diff/merge",
|
"description": "A javascript UI for diff/merge",
|
||||||
"license": "(GPL-3.0 OR LGPL-3.0 OR MPL-1.1 OR SEE LICENSE IN LICENSE)",
|
"license": "(GPL-3.0 OR LGPL-3.0 OR MPL-1.1 OR SEE LICENSE IN LICENSE)",
|
||||||
"author": {
|
"author": {
|
||||||
|
|||||||
@@ -2,6 +2,12 @@ const CodeMirror = require('codemirror');
|
|||||||
require('codemirror/addon/search/searchcursor.js');
|
require('codemirror/addon/search/searchcursor.js');
|
||||||
require('codemirror/addon/selection/mark-selection.js');
|
require('codemirror/addon/selection/mark-selection.js');
|
||||||
require('codemirror/lib/codemirror.css');
|
require('codemirror/lib/codemirror.css');
|
||||||
|
require('codemirror/mode/go/go.js');
|
||||||
|
require('codemirror/mode/javascript/javascript.js');
|
||||||
|
require('codemirror/mode/htmlmixed/htmlmixed.js');
|
||||||
|
require('codemirror/mode/markdown/markdown.js');
|
||||||
|
require('codemirror/mode/python/python.js');
|
||||||
|
|
||||||
const dom = require('./dom.js');
|
const dom = require('./dom.js');
|
||||||
const VDoc = require('./vdoc');
|
const VDoc = require('./vdoc');
|
||||||
|
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ diff.prototype._sms = function(lhs_ctx, lhs_lower, lhs_upper, rhs_ctx, rhs_lower
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Extend the reverse path.
|
// Extend the reverse path.
|
||||||
for (k = kup - d; k <= kup + d; k += 2) {
|
for (let k = kup - d; k <= kup + d; k += 2) {
|
||||||
// find the only or better starting point
|
// find the only or better starting point
|
||||||
if (k === kup + d) {
|
if (k === kup + d) {
|
||||||
x = vector_u[offset_up + k - 1]; // up
|
x = vector_u[offset_up + k - 1]; // up
|
||||||
|
|||||||
@@ -23,7 +23,8 @@ const defaultOptions = {
|
|||||||
vpcolor: 'rgba(0, 0, 200, 0.5)',
|
vpcolor: 'rgba(0, 0, 200, 0.5)',
|
||||||
license: 'lgpl',
|
license: 'lgpl',
|
||||||
cmsettings: {
|
cmsettings: {
|
||||||
styleSelectedText: true
|
styleSelectedText: true,
|
||||||
|
mode: null
|
||||||
},
|
},
|
||||||
lhs_cmsettings: {},
|
lhs_cmsettings: {},
|
||||||
rhs_cmsettings: {},
|
rhs_cmsettings: {},
|
||||||
|
|||||||
@@ -22,7 +22,8 @@ const defaultOptions = {
|
|||||||
vpcolor: 'rgba(0, 0, 200, 0.5)',
|
vpcolor: 'rgba(0, 0, 200, 0.5)',
|
||||||
license: 'lgpl',
|
license: 'lgpl',
|
||||||
cmsettings: {
|
cmsettings: {
|
||||||
styleSelectedText: true
|
styleSelectedText: true,
|
||||||
|
mode: null
|
||||||
},
|
},
|
||||||
_debug: false
|
_debug: false
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user