Skip to content

Commit 5bf24ac

Browse files
committed
Fix to ignore spaces in object references file (#67)
Signed-off-by: worksofliam <mrliamallan@live.co.uk>
1 parent 564645b commit 5bf24ac

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

cli/src/utils.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -125,18 +125,18 @@ export function getReferenceObjectsFrom(content: string) {
125125
let currentObject: ILEObject;
126126

127127
for (let line of lines) {
128-
const shortLine = line.trim();
129-
if (shortLine.length === 0) continue;
130-
if (shortLine.startsWith(`#`)) continue;
128+
const upperLine = line.trim().toUpperCase();
129+
if (upperLine.length === 0) continue;
130+
if (upperLine.startsWith(`#`)) continue;
131131

132132
// If the line starts with space, then it's an export of the parent
133133
if (line.startsWith(` `) || line.startsWith(`\t`)) {
134134
if (currentObject) {
135-
currentObject.exports.push(shortLine.toUpperCase());
135+
currentObject.exports.push(upperLine);
136136
}
137137

138138
} else {
139-
const objectParts = line.toUpperCase().split(`.`);
139+
const objectParts = upperLine.split(`.`);
140140

141141
if (objectParts[0].length > 10) {
142142
warningOut(`Trying to add referenced object: object name '${objectParts[0]}' is too long.`);

0 commit comments

Comments
 (0)