contensis-cli 1.0.0-beta.94 → 1.0.0-beta.95

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/util/diff.ts CHANGED
@@ -40,12 +40,14 @@ export const diffFileContent = (
40
40
 
41
41
  const lnSpaces = Array(lnSpaceLength).join(' ');
42
42
 
43
+ let needsNewLine = false;
43
44
  for (let i = 0; i < diffRanges.length; i++) {
44
45
  const part = diffRanges[i];
45
46
  if (part.added || part.removed) {
46
47
  const colour = part.added ? 'green' : part.removed ? 'red' : 'grey';
47
48
 
48
- if (part.value !== '\n')
49
+ if (part.value !== '\n') {
50
+ if (needsNewLine) output.push('\n### --');
49
51
  output.push(
50
52
  `\n${part.value
51
53
  .split('\n')
@@ -60,11 +62,11 @@ export const diffFileContent = (
60
62
  )
61
63
  .join('\n')}`
62
64
  );
63
- }
65
+ } else needsNewLine = true;
66
+ } else needsNewLine = true;
64
67
  }
65
68
 
66
69
  return output.join('');
67
- // return retOutput.endsWith('\n') ? retOutput : `${retOutput}\n`;
68
70
  };
69
71
 
70
72
  const addDiffPositionInfo = (diff: Change[]) => {
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const LIB_VERSION = "1.0.0-beta.94";
1
+ export const LIB_VERSION = "1.0.0-beta.95";