Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested block of comments in SQL code isn't highlighted correctly #11718

Closed
piomiq opened this issue May 25, 2022 · 3 comments
Closed

Nested block of comments in SQL code isn't highlighted correctly #11718

piomiq opened this issue May 25, 2022 · 3 comments
Labels
language-support Issues or PRs related to programming languages (also e.g. in styles, themes) scintilla dependent Can't be considered for N++ implementation unless/until Scintilla changes

Comments

@piomiq
Copy link

piomiq commented May 25, 2022

Description of the Issue

Code of SQL commented by block commands which is nested (example below) is not highlighted correctly. Please notice that in Microsoft SQ Server Management Studio below works as expected.

/* aaaaaaaaaa
/* bbbbbbbbbbbbbbb */
aaaaaaaaaa */

Steps to Reproduce the Issue

  1. Put below into editor
    /* aaaaaaaaaa
    /* bbbbbbbbbbbbbbb */
    aaaaaaaaaa */

  2. Change highlighting with SQL

Expected Behavior

all lines coming from example should be like as commented

Actual Behavior

last line is incorrectly highlighted - like would be not commented

@piomiq piomiq changed the title nested block comments in sql code isn't highlighted orrectly Nested block of comments in sql code isn't highlighted orrectly May 25, 2022
@piomiq piomiq changed the title Nested block of comments in sql code isn't highlighted orrectly Nested block of comments in SQL code isn't highlighted orrectly May 25, 2022
@piomiq piomiq changed the title Nested block of comments in SQL code isn't highlighted orrectly Nested block of comments in SQL code isn't highlighted correctly May 25, 2022
@rdipardo
Copy link
Contributor

This would be an issue for the project that maintains the SQL lexer: https://github.com/ScintillaOrg/lexilla/issues

The target dialect is Oracle SQL, and I couldn't find an example of nested comments here: https://docs.oracle.com/cd/B14117_01/server.101/b10759/sql_elements006.htm#sthref522

@piomiq
Copy link
Author

piomiq commented May 27, 2022

BTW. The same issue happens for C++, Java and the most likely in all other languages where is allowed block comment.
Anyway I will report this issue to ScintillaOrg.

About target dialect.
I think any example is not necessary in this case. The simplest way would be just test it in Oracle SQL Plus editor or any Oracle developer application like Toad for Oracle.

@rdipardo
Copy link
Contributor

Fixed for Transact-SQL in ScintillaOrg/lexilla@ab003b93

"Ordinary" SQL was never an issue because the Notepad++ lexer is based on Oracle PL/SQL, which doesn't allow nested block comments: https://docs.oracle.com/cd/B19306_01/appdev.102/b14261/fundamentals.htm#sthref364

@ArkadiuszMichalski ArkadiuszMichalski added language-support Issues or PRs related to programming languages (also e.g. in styles, themes) scintilla dependent Can't be considered for N++ implementation unless/until Scintilla changes labels Oct 13, 2022
@donho donho closed this as completed in 01bbebf Mar 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
language-support Issues or PRs related to programming languages (also e.g. in styles, themes) scintilla dependent Can't be considered for N++ implementation unless/until Scintilla changes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants