Fix for bug #333156 "PHP Comment not highlighted correctly"

Review Request #119759 - Created Aug. 13, 2014 and submitted

Information
Martin Walch
kate
KDE/4.14
333156
Reviewers
kate

The bug reporter provides a test case:
<?php

/**#@*/
echo 1;

This results in bad highlighting, because the @ character eats the closing comment marker */, making the following lines a part of the doc comment.

While the test case does not make much sense, I have not found any other parser that would fail to recognize the doc comment as closed.

It is also plausible to encounter "@*/" for a short moment while the user is writing a doc comment, so it is desirable to not expand the comment over the whole function for this moment.

Fix it by refusing '*' in a tag name of a multiline doc comment if a '/' follows.

Increment doxygen.xml version number from 1.37 to 1.38.

REVIEW: 119759
BUG: 333156

Patch applies to KDE/4.14 branch. (Surprisingly, it looks like it would also apply cleanly to the KDE/4.13 branch.)

Test case works fine in Kate 3.13.3.

Milian Wolff
Martin Walch
Review request changed

Status: Closed (submitted)

Loading...