Bug 470920

Summary: Makefile syntax highlighting doesn't handle line-breaks for multiple targets
Product: [Frameworks and Libraries] frameworks-syntax-highlighting Reporter: samcaspar
Component: syntaxAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: wishlist CC: christoph, samcaspar, walter.von.entferndt
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: screenshot example

Description samcaspar 2023-06-12 01:42:27 UTC
Created attachment 159606 [details]
screenshot example

Syntax highlighting handles line breaks in dependencies correctly, e.g.:

```
target1 target2 &: \
		dep1 \
		dep2 \
		dep3
```

will correctly highlight all of the deps as (for me) blue, the line breaks as purple, and the targets as yellow.

However if I have multiple targets split over multiple lines:

```
target1 \
target2 \
target3 &: \
		dep1 \
		dep2 \
		dep3
```

Then the first two lines of targets area not highlighted.

Apologies if pedantic.
Comment 1 Bug Janitor Service 2023-07-11 01:53:08 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/syntax-highlighting/-/merge_requests/500
Comment 2 Christoph Cullmann 2023-07-12 21:16:14 UTC
Git commit ae9a777a68c99f77df17c172a370c199f43512cc by Christoph Cullmann, on behalf of Jonathan Poelen.
Committed on 12/07/2023 at 21:16.
Pushed by cullmann into branch 'master'.

Makefile: add multi-line target, target variable value, target separator and...

Makefile: add multi-line target, target variable value, target separator and keyword ; fix define and escaped rule

- multi-line target

```mk
target1 \
target2: ....
```

- target-specific variable value

```mk
prog: private EXTRA_CFLAGS = -L/usr/local/lib
prog: CFLAGS = -g
 #    ^ variable
 #            ^ value
```

- target separator

```mk
prog:
prog::
prog&:
prog&::
 #  ^ TargetSeparator style
```

- fix escaped rule

```mk
prog:
	echo bla \
   bla
 #^ no tab is ok
```

M  +23   -1    autotests/folding/Makefile.fold
M  +32   -10   autotests/html/Makefile.dark.html
M  +32   -10   autotests/html/Makefile.html
M  +23   -1    autotests/input/Makefile
M  +32   -10   autotests/reference/Makefile.ref
M  +2    -2    data/syntax/latex.xml
M  +101  -28   data/syntax/makefile.xml

https://invent.kde.org/frameworks/syntax-highlighting/-/commit/ae9a777a68c99f77df17c172a370c199f43512cc