Skip to content

Commit

Permalink
Merge b54c258 into 0b6765b
Browse files Browse the repository at this point in the history
  • Loading branch information
erikn69 committed Jul 25, 2022
2 parents 0b6765b + b54c258 commit 79ab831
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const highlighters = [
},
{
name: 'string',
regex: /(["'`].*?["'`])/g
regex: /(['].*?[']|["].*?["]|[`].*?[`])/g
},
{
name: 'bracket',
Expand Down
2 changes: 2 additions & 0 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ console.log(highlight('WITH t1 AS (SELECT data_point FROM tablename) SELECT data

console.log(highlight('SELECT id FROM listings WHERE status = \'not available\''))
console.log(highlight('SELECT id FROM listings WHERE status = "not available"'))

console.log(highlight('SELECT \'{"json_index":"json_value"}\' AS test;'))

0 comments on commit 79ab831

Please sign in to comment.