Commit 2fe16fe8 authored by Martin Walch's avatar Martin Walch

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

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
FIXED-IN: 4.14.1
parent f73eed8b
......@@ -29,7 +29,7 @@
-->
<language name="Doxygen"
version="1.37"
version="1.38"
kateversion="2.5"
section="Markup"
extensions="*.dox;*.doxygen"
......@@ -293,7 +293,7 @@
<keyword attribute="Tags" context="ML_TagWordWord" String="TagWordWord" />
<keyword attribute="Tags" context="ML_TagString" String="TagString" />
<keyword attribute="Tags" context="ML_TagWordString" String="TagWordString" />
<RegExpr attribute="Custom Tags" context="#stay" String="[@\\][^@\\ \t]+" />
<RegExpr attribute="Custom Tags" context="#stay" String="[@\\]([^@\\ \t\*]|\*(?!/))+" />
<DetectIdentifier />
<RegExpr attribute="Tags" context="#stay" String="\\(&lt;|&gt;)" />
<Detect2Chars attribute="Comment" context="#stay" char="&lt;" char1="&lt;" />
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment