Skip to content

Commit 6ecf96f

Browse files
fix: properly escape new lines (#179)
1 parent 11f611c commit 6ecf96f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

forward_engineering/utils/general.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,8 @@ const wrapInBracketsIfNecessary = name => {
162162
return name.replace(/^(?!\().*?(?<!\))$/, '($&)');
163163
};
164164

165-
const escapeSpecialCharacters = (name = '') => {
166-
return name.replace(/'/g, "''");
165+
const escapeSpecialCharacters = (str = '') => {
166+
return str.replaceAll("'", "''").replaceAll('\n', '\r\n');
167167
};
168168

169169
const skipSqlCommentsPattern = /^\s*(EXEC\b|.*\bMS_DESCRIPTION\b)/i;

0 commit comments

Comments
 (0)