Skip to content

Built-in syntax highlight for Shell files fails on double+single-quoted dollar sign " ' $ ' " #13911

@ethsol

Description

@ethsol

Description of the Issue

Built-in syntax highlight for Shell files fails on double+single-quoted dollar sign " ' $ ' "

Steps to Reproduce the Issue

  1. Create a new text file
  2. Set language to Shell
  3. Paste the following:
#Notepad++ 8.5.4 syntax highlight fault
#Language / S / Shell

#search for files not ending with LineFeed
fd . /root/scripts/ -t f -x sh -c "if tail -c1 {} | hexdump -c | head -1 | grep -v '\\n *$' ; then echo -e {}\\\n; fi"
echo FAULTY
echo " ' " REPAIR MAGIC

echo " $ " GOOD
echo ' $ ' GOOD
echo ' " $ "' GOOD

echo " ' $' " FAULTY
echo " ' " REPAIR MAGIC

for i in /*; do echo $i; done

Expected Behavior

All echo statements should be coloured equally

Actual Behavior

The two lines marked with FAULTY break the syntax highlight, the following content is colored like a string, until the REPAIR MAGIC lines correct it.

2023-07-20_13_26_48-_uj 1 - Notepad++

Debug Information

Notepad++ v8.5.4 (64-bit)
Build time : Jun 17 2023 - 20:42:45
Path : C:\Program Files\Notepad++\notepad++.exe
Command Line :
Admin mode : OFF
Local Conf mode : OFF
Cloud Config : OFF
OS Name : Windows 10 Enterprise (64-bit)
OS Version : 22H2
OS Build : 19045.2965
Current ANSI codepage : 1250
Plugins :
mimeTools (2.9)
NppConverter (4.5)
NppExport (0.4)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions