You are here: PSPad forum > English discussion forum > Re: unix highlighter too aggressive with # inline comments

Re: unix highlighter too aggressive with # inline comments

#1 unix highlighter too aggressive with # inline comments

Posted by: Mike4Online | Date: 11/23/2016 19:44 | IP: IP Logged

Jan,

Using PsPad 4.6.1 (2730), I found that in a unix shell script, any text following a # will be highlighted as a comment. But for # in the middle of a line, this should only be true if the # is preceeded by whitespace.

For example, the following shell script shows two comments in the PsPad highlighter:

#!/bin/bash
touch test1.txt
touch test#2.txt
touch test3.txt
ls test1.txt test#2.txt test3.txt

But there are no comments in the above script, which will execute as expected.

The need for whitespace before a # comment that is in the middle of the line is documented at the following link:

tldp.org

Thanks,
- Michael

Options: Reply | Quote | Up ^


#2 Re: unix highlighter too aggressive with # inline comments

Posted by: pspad | Date: 11/24/2016 11:32 | IP: IP Logged

Fixed. I also fixed escaped case \#
It will be available in the next build

Options: Reply | Quote | Up ^






Editor PSPad - freeware editor, © 2001 - 2018 Jan Fiala
Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák