notepad-plus-plus / notepad-plus-plus/notepad-plus-plus
Make 'uncomment' for XML and HTML work, and be compatible with Visual Studio
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
When uncommenting a line in an XML file (or HTML) file using Ctrl+Shift+K, it doesn't work if the line was commented in Visual Studio, and not Notepad++, in certain cases based on text being commented.
Steps to Reproduce the Issue
-
Create an XML file that looks something like this:
<system.web>
</system.web> -
Put the cursor on either line (say the first line). As long as the line ends with a
> -
Hit Ctrl+K to comment it. The line changes to:
<!-- <system.web> -->
Note the space after the <!-- and before the -->. Remove those spaces so the line looks like this:
<!--<system.web>-->
This is the way Visual Studio would have comment the line (using their Ctrl+K,Ctrl+C keystrokes)
Now try to uncomment it in Notepad++ using Ctrl+Shift+K
Expected Behavior
It won't uncomment.
Actual Behavior
It will uncomment -- just like Visual Studio does using their Ctrl+K,Ctrl+U keystrokes.
Debug Information
If you change this:
<!--<system.web>-->
to this:
<!--<system.web> -->
by adding a space before the -->, then Ctrl+Shift+K works.
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
Reproduce Ctrl+Shift+K on XML and HTML comments in both Notepad++ and Visual Studio styles, especially comments without spaces around the content. Trace the editor's uncomment command and compare behavior for the two comment forms; done means both forms are uncommented correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100