@jdeighan/coffee-utils 7.0.43 → 7.0.44
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/package.json +1 -1
- package/src/indent_utils.coffee +2 -2
- package/src/indent_utils.js +2 -2
package/package.json
CHANGED
package/src/indent_utils.coffee
CHANGED
@@ -78,7 +78,7 @@ export undented = (text, level=undef) ->
|
|
78
78
|
else if isArray(text)
|
79
79
|
lLines = text
|
80
80
|
for line in lLines
|
81
|
-
assert isString(line), "undented():
|
81
|
+
assert isString(line), "undented(): array not all strings"
|
82
82
|
if (lLines.length == 0)
|
83
83
|
return []
|
84
84
|
else
|
@@ -91,7 +91,7 @@ export undented = (text, level=undef) ->
|
|
91
91
|
else
|
92
92
|
lMatches = lLines[0].match(/^\s*/)
|
93
93
|
toRemove = lMatches[0]
|
94
|
-
nToRemove = toRemove
|
94
|
+
nToRemove = indentLevel(toRemove)
|
95
95
|
|
96
96
|
lNewLines = []
|
97
97
|
for line in lLines
|
package/src/indent_utils.js
CHANGED
@@ -99,7 +99,7 @@ export var undented = function(text, level = undef) {
|
|
99
99
|
lLines = text;
|
100
100
|
for (i = 0, len = lLines.length; i < len; i++) {
|
101
101
|
line = lLines[i];
|
102
|
-
assert(isString(line), "undented():
|
102
|
+
assert(isString(line), "undented(): array not all strings");
|
103
103
|
}
|
104
104
|
if (lLines.length === 0) {
|
105
105
|
return [];
|
@@ -115,7 +115,7 @@ export var undented = function(text, level = undef) {
|
|
115
115
|
lMatches = lLines[0].match(/^\s*/);
|
116
116
|
toRemove = lMatches[0];
|
117
117
|
}
|
118
|
-
nToRemove = toRemove
|
118
|
+
nToRemove = indentLevel(toRemove);
|
119
119
|
lNewLines = [];
|
120
120
|
for (j = 0, len1 = lLines.length; j < len1; j++) {
|
121
121
|
line = lLines[j];
|