Skip to content

Commit

Permalink
style: use EJS comments
Browse files Browse the repository at this point in the history
  • Loading branch information
php-coder committed Apr 8, 2024
1 parent cebb89d commit ca96c1f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/templates/app.js.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const pool = mysql.createPool({
if (!values) {
return query
}
<%- // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#specifying_a_function_as_the_replacement -%>
<%# See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#specifying_a_function_as_the_replacement -%>
return query.replace(/\:(\w+)/g, function(matchedSubstring, capturedValue) {
if (values.hasOwnProperty(capturedValue)) {
return this.escape(values[capturedValue])
Expand Down
2 changes: 1 addition & 1 deletion src/templates/app.ts.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const pool = mysql.createPool({
if (!values) {
return query
}
<%- // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#specifying_a_function_as_the_replacement -%>
<%# See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#specifying_a_function_as_the_replacement -%>
return query.replace(/\:(\w+)/g, function(this: mysql.Pool, matchedSubstring: string, capturedValue: string) {
if (values.hasOwnProperty(capturedValue)) {
return this.escape(values[capturedValue])
Expand Down

0 comments on commit ca96c1f

Please sign in to comment.