Komodo / KomodoEdit

Komodo Edit is a fast and free multi-language code editor. Written in JS, Python, C++ and based on the Mozilla platform.
http://www.komodoide.com/komodo-edit
Other
2.14k stars 299 forks source link

Perl regexp with /x switch #3958

Open Solathian opened 1 year ago

Solathian commented 1 year ago

Short Summary

In Perl a \x switch enables whitespaces inside a regexp The characters after a '#' and between the linebreak are not considered as comments in terms of formatting.

Steps to Reproduce

Create a regexp with \x switch and add comments into it. For example: m/^(.{2}) # $byteLow 1 byte - any two characters after start (.{2}) # $byteHigh 1 byte - any two characters .{6} # - any 6 characters $/x; # line end, x to enable whitespaces in regexp

Expected results

Every character shall be formatted as a comment between the # and the linebreak in the regexp, if the \x switch is enabled.

Actual results

The entire line has regexp format, even if a # is present with the \x switch. See attached screenshot.

Platform Information

Komodo Edit, version 12.0.1, build 18441, platform win32-x86. Built on Tue Feb 11 04:14:27 2020.

Additional Information

https://perldoc.perl.org/perlre#/x-and-/xx image