Comparing version 1.1.6 to 1.1.7
@@ -60,5 +60,9 @@ const { diffChars } = require('diff'); | ||
if (added) { | ||
p = s.map(t => c(t, 'green')).join(b(' ', 'green')) | ||
p = s.map(t => { | ||
return t.replace(/\n$/mg, '⏎\n') | ||
}).map(t => c(t, 'green')).join(b(' ', 'green')) | ||
} else if (removed) { | ||
p = s.map(t => c(t, 'red')).join(b(' ', 'red')) | ||
p = s.map(t => { | ||
return t.replace(/\n$/mg, '⏎\n') | ||
}).map(t => c(t, 'red')).join(b(' ', 'red')) | ||
} else { | ||
@@ -65,0 +69,0 @@ p = c(value, 'grey') |
## 24 January 2019 | ||
### 1.1.7 | ||
- [fix] Restore missing new line handling. | ||
## 24 January 2019 | ||
### 1.1.6 | ||
@@ -15,2 +21,20 @@ | ||
## 26 May 2018 | ||
### 1.1.4 | ||
- [build] source maps | ||
- [test] test build, class context | ||
- [package] artdeco eslint | ||
## 15 May 2018 | ||
### 1.1.3 | ||
- [fix] correct order when replacing new lines. | ||
### 1.1.2 | ||
- [feature] indicate new lines better | ||
## 12 May 2018 | ||
@@ -17,0 +41,0 @@ |
{ | ||
"name": "erte", | ||
"version": "1.1.6", | ||
"version": "1.1.7", | ||
"description": "String difference with colour for Node.js.", | ||
@@ -10,3 +10,3 @@ "main": "build", | ||
"test": "yarn t test/spec", | ||
"test-build": "ALAMODE_ENV=test-build yarn t test/spec", | ||
"test-build": "ALAMODE_ENV=test-build yarn test", | ||
"b": "alamode src -o build -s", | ||
@@ -44,5 +44,5 @@ "doc": "doc documentary -o README.md", | ||
"devDependencies": { | ||
"alamode": "1.6.1", | ||
"alamode": "1.8.4", | ||
"snapshot-context": "2.0.4", | ||
"zoroaster": "3.6.6" | ||
"zoroaster": "3.8.2" | ||
}, | ||
@@ -49,0 +49,0 @@ "dependencies": { |
@@ -60,5 +60,5 @@ <a href="https://artdeco.bz/erte"><img align="right" src="doc/woman.jpg" width="225" alt="erte" /> | ||
``` | ||
[90mtest this string[0m[32m[0m[42m [0m[32mwith[0m[42m [0m[32mextra[0m[42m [0m[32mdata[0m | ||
[90mtest this[0m[31m[0m[41m [0m[31mstring[0m | ||
[90mtest this string[0m | ||
test this string with extra data | ||
test this string | ||
test this string | ||
``` | ||
@@ -65,0 +65,0 @@ |
@@ -60,5 +60,9 @@ import { diffChars } from 'diff' | ||
if (added) { | ||
p = s.map(t => c(t, 'green')).join(b(' ', 'green')) | ||
p = s.map(t => { | ||
return t.replace(/\n$/mg, '⏎\n') | ||
}).map(t => c(t, 'green')).join(b(' ', 'green')) | ||
} else if (removed) { | ||
p = s.map(t => c(t, 'red')).join(b(' ', 'red')) | ||
p = s.map(t => { | ||
return t.replace(/\n$/mg, '⏎\n') | ||
}).map(t => c(t, 'red')).join(b(' ', 'red')) | ||
} else { | ||
@@ -65,0 +69,0 @@ p = c(value, 'grey') |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9805
148