Skip to content

"Toggle Single Line Comment" malfunctioning with HTML/XML (fix now included) #3869

@CookiePLMonster

Description

@CookiePLMonster

Description of the Issue

Normally upon pressing Ctrl+Q, user should be able to toggle selected lines between commented/uncommented states. However, when editing HTML/XML files (or possibly any types of files which have single line comments with both opening and closing tags - however, I haven't verified this claim yet) this feature seems to malfunction and continuous invocation of the functionality only results in more comments being added.

Steps to Reproduce the Issue

  1. Open Notepad++ and create a new document
  2. Set editing mode to XML (Language -> XML)
  3. Input any text
  4. Press Ctrl+Q to invoke "Toggle Single Line Comment".
  5. Press Ctrl+Q to invoke it again.

Expected Behavior

After step 4, line should be commented (for example, <!-- foo -->). It is the case at the moment.
After step 5, line should be uncommented again (for example, foo). Is is not the case at the moment.

Actual Behavior

After step 5, line got a second set of comments around it (<!-- <!-- foo --> -->).

Debug Information

Notepad++ v7.5.1 (64-bit)
Build time : Aug 29 2017 - 02:38:44
Path : C:\Program Files\Notepad++\notepad++.exe
Admin mode : OFF
Local Conf mode : OFF
OS : Windows 10 (64-bit)
Plugins : mimeTools.dll NppConverter.dll

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions