notepad-plus-plus / notepad-plus-plus/notepad-plus-plus
In SQL, two consecutive hyphens in square brackets are considered a comment mark
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 29.4k
- Forks
- 5.4k
- PR merge metrics
- No merged PRs in 30d
Description
Description of the Issue
I noticed that in SQL, two consecutive hyphens are considered a comment mark, even when enclosed in square brackets.
Steps to Reproduce the Issue
- Copy the example above
- Paste it in a new Notepad++ sheet
- Set language to SQL
Expected Behavior
I think any text in square brackets should be ignored when parsing.
Actual Behavior
In the example below, --AMOUNT] is colored in green in a Notepad++ SQL page even though it is a field name:
[T_INVOICES_RAW_IMPORT].[CHARGE--AMOUNT]
Debug Information
Notepad++ v8.2.1 (32-bit)
Build time : Jan 19 2022 - 18:38:49
Path : C:\Program Files (x86)\Notepad++\notepad++.exe
Command Line :
Admin mode : OFF
Local Conf mode : OFF
Cloud Config : OFF
OS Name : Windows 10 Enterprise (64-bit)
OS Version : 2004
OS Build : 19041.1415
Current ANSI codepage : 1252
Plugins : CodeAlignmentNpp.dll ComparePlugin.dll HTMLTag_unicode.dll mimeTools.dll MultiClipboard.dll NppConverter.dll NppExport.dll NppQrCode32.dll PoorMansTSqlFormatterNppPlugin.dll PreviewHTML.dll Translate.dll XMLTools.dll
Regards.
Eric.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file or test is named. Start by reproducing the SQL syntax-highlighting behavior with [CHARGE--AMOUNT] in SQL language mode, then locate the SQL lexer or language-definition entry point responsible for comment coloring. Done means consecutive hyphens inside square-bracketed identifiers are not colored as comments.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- sql
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100