Skip to content

SQL Tick marks not highlighting as a string #3140

@TheColorRed

Description

@TheColorRed

Information

  • Language: SQL, MySQL
  • Plugins: none

image

Description

When using ` marks to surround a keyword, the word should be formatted as a string.

Adding a tick to this fixes the issue:

Prism.languages.sql = {
	'string': {
		pattern: /(^|[^@\\])("|'|`)(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,
		greedy: true,
		lookbehind: true
	},
}
The code being highlighted incorrectly.
select
   `t`.`col1`, `t`.`col2`, `t`.`col3`, `t`.`col4` 
from
   `test_table` as `t`

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions