michael-s-molina commented on code in PR #23378:
URL: https://github.com/apache/superset/pull/23378#discussion_r1146569895
##########
superset-frontend/src/SqlLab/actions/sqlLab.js:
##########
@@ -331,6 +331,12 @@ export function fetchQueryResults(query, displayLimit) {
};
}
+export function cleanSqlComments(sql) {
+ if (!sql) return '';
+
+ return sql.replace(/(\/\*[^*]*\*\/)|(\/\/[^*]*)|(--[^.].*)/gm, '').trim();
Review Comment:
@justinpark The latest update broke `//` comments. You can test the regex
[here](https://regexr.com/7ap81).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]