-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Description
Describe the Bug
Escape of character '
Generally it should be [' ']. Only in in MySQL and PostgreSQL ['] escapes it.
Works in MSSQL + Oracle:
update FileConnection set ServerPath = REPLACE(ServerPath, '\edi\','\edi_test\') where ConnectName = 'EDI';
In Bookstack it destroys the coloring
CodeMirror Give me this:
import {basicSetup, EditorView} from "codemirror"
import {sql, MSSQL} from "@codemirror/lang-sql"
new EditorView({
doc: "update FileConnection set ServerPath = REPLACE(ServerPath, '\edi\','\edi_test\') where ConnectName = 'EDI';",
extensions: [basicSetup, sql({dialect: MSSQL})],
parent: document.body
})
Steps to Reproduce
CodeMirrors Code-Block
SQL-Code
update FileConnection set ServerPath = REPLACE(ServerPath, '\edi\','\edi_test\') where ConnectName = 'EDI';
Expected Behaviour
There are several SQL Server products and with other logic, please do for example:
SQL (MYSQL/PostgreSQL) With the right highlighting
SQL (ORACLE/MSSQL) With the right highlighting
Screenshots or Additional Context
No response
Browser Details
all Browser
Exact BookStack Version
22.11.1
PHP Version
8.1
Hosting Environment
Docker