Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #8947
    Jamil
    Participant

    I have an example SQL Server SQL script below:

    DECLARE @SQL_VAR VARCHAR(4000)
    SET @SQL_VAR = ‘SELECT * FROM dbo.Table’
    EXEC(@SQL_VAR)

    This script is colorized correctly as is.

    However, if I modify the sript as follow, colorization breaks:

    DECLARE @SQL_VAR VARCHAR(4000)
    SET @SQL_VAR = ‘
    SELECT *
    FROM dbo.Table

    EXEC(@SQL_VAR)

    The script above is valid and colorized correctly with Microsoft’s SQL Server Management Studio. It appears EmEditor cannot handle a single string containing new lines.

    I have reproduced this under the 32-bit and 64-bit versions of 10.0.1

    #8948
    CrashNBurn
    Member

    I’ve noticed this when attempting to create a custom CodeCollapse, that I was unable to use a multi-line regex… which really limits the whole idea of “replace match with string”
    Since you can’t replace a match with a back-reference 1 2 etc if it’s a multi-line regex. :P

    #8967
    Jibz
    Member

    Try going into the properties for the EmEditor SQL configuration (Alt-Enter if you’re looking at the example at the moment), and on the Highlight (2) tab, under “String Enclosed by Quotation Marks”, check “Continue to Next Line”.

    Seems to do the trick here.

    #8974
    Jamil
    Participant

    Ah — I never noticed/realized the purpose of that option.

    Yes — turning hat option on resolved this issue.

    Thanks.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.