diff --git a/autotests/html/highlight.dox.html b/autotests/html/highlight.dox.html index 7eeae66..990dc60 100644 --- a/autotests/html/highlight.dox.html +++ b/autotests/html/highlight.dox.html @@ -1,234 +1,234 @@
This is a pseudo doxygen file to test Kate's doxyge syntax highlighting. Normal text, no HL. =================== a multiline comment may begin with a /*! */, too. That should work, because it is the same "entrance rule". popping tests: /** multiline */ end of doxygen HL mode /*! multiline */ end of doxygen HL mode //! singleline, where */ should be ignored! still doxygen HL mode /// singleline, where */ should be ignored! still doxygen HL mode ///< singleline, where */ should be ignored! still doxygen HL mode begin and end immediately: /********/ actually no doxygen comment - used for "info boxes" :) /**/ <-- it really works --- end of doxygen HL mode /*!*/ end of doxygen HL mode <tag> <normal comment HL> /** \code rest of line is normal comment HL */ end of doxygen HL mode /** \code rest of line is normal comment HL * comment HL mode */ end of doxygen HL mode <tag> <word> <normal comment HL> /** \file aword rest of line is normal comment HL */ end of doxygen HL mode /** \file */aword <-- pop! no doxygen HL mode /** \file aword rest of line is normal comment HL * comment HL mode */ end of doxygen HL mode <tag> <rest of line is string> /** \brief A short description */ end of doxygen HL mode /** \brief */A <-- pop! end of doxygen HL mode /** \brief A short description * comment HL mode */ end of doxygen HL mode <tag> <word> <rest of line is string> /** \page aword rest of line is string */ end of doxygen HL mode /** \page */aword <-- pop! end of doxygen HL mode /** \page aword rest of line is string * comment HL mode */ end of doxygen HL mode <tag> <word> <word> <normal comment HL> /** \image aword aword rest of line is normal HL */ end of doxygen HL mode /** \image aword */aword <-- pop! end of doxygen HL mode /** \image */aword aword <-- pop! end of doxygen HL mode /** \image aword aword rest of line is normal HL * comment HL mode */ end of doxygen HL mode Tests for HTML tags in doxygen HL mode: ======================================= /** <a href="blubb" href='blubb'> */ end of doxygen HL mode /** <a href="blubb" href='blubb'*/> end of doxygen HL mode /** <a href="blubb" href='blubb*/'> end of doxygen HL mode /** <a href="blubb" href='blub*/b'> end of doxygen HL mode /** <a href="blubb" href='b*/lubb'> end of doxygen HL mode /** <a href="blubb" href='*/blubb'> end of doxygen HL mode /** <a href="blubb" href=*/'blubb'> end of doxygen HL mode /** <a href="blubb" href*/='blubb'> end of doxygen HL mode /** <a href="blubb" hre*/f='blubb'> end of doxygen HL mode /** <a href="blubb" */href='blubb'> end of doxygen HL mode /** <a href="blubb"> */ end of doxygen HL mode /** <a href="blubb"*/> end of doxygen HL mode /** <a href="blubb*/"> end of doxygen HL mode /** <a href="blub*/b"> end of doxygen HL mode /** <a href="*/blubb"> end of doxygen HL mode /** <a href=*/"blubb"> end of doxygen HL mode /** <a href*/="blubb"> end of doxygen HL mode /** <a h*/ref="blubb"> end of doxygen HL mode /** <a */href="blubb"> end of doxygen HL mode /** <a*/ href="blubb"> end of doxygen HL mode /** <*/a href="blubb"> end of doxygen HL mode //! <a href="blubb" href='blubb'> */ stay in doygen HL mode //! <a href="blubb" href='blubb'*/> stay in doygen HL mode //! <a href="blubb" href='blubb*/'> stay in doygen HL mode //! <a href="blubb" href='blu*/bb'> stay in doygen HL mode //! <a href="blubb" href='*/blubb'> stay in doygen HL mode //! <a href="blubb" href=*/'blubb'> stay in doygen HL mode //! <a href="blubb"> */ stay in doygen HL mode //! <a href="blubb"*/> stay in doygen HL mode //! <a href="blubb*/"> stay in doygen HL mode //! <a href="blub*/b"> stay in doygen HL mode //! <a href="*/blubb"> stay in doygen HL mode //! <a href=*/"blubb"> stay in doygen HL mode //! <a href*/="blubb"> stay in doygen HL mode //! <a h*/ref="blubb"> stay in doygen HL mode //! <a */href="blubb"> stay in doygen HL mode //! <a*/ href="blubb"> stay in doygen HL mode //! <*/a href="blubb"> stay in doygen HL mode //! <a href="blubb"> stay in doygen HL <mode here should be normal HL mode (no doxygen!) Tests for HTML tags in doxygen HL mode with tags: ================================================= <tag> <normal comment HL> /** \code rest <a href="blubb"> of </a href='blubb'> line is normal comment HL */ end of doxygen HL mode /** \code rest <a href="blubb"> of </a href='blubb'*/> end of doxygen HL mode /** \code rest <a href="blubb"> of </a href='blubb*/'> end of doxygen HL mode /** \code rest <a href="blubb"> of </a href='*/blubb'> end of doxygen HL mode /** \code rest <a href="blubb"> of </a href=*/'blubb'> end of doxygen HL mode /** \code rest <a href="blubb*/"> of </a href=*/'blubb'> end of doxygen HL mode /** \code rest <a href=*/"blubb"> of </a href='blubb'> end of doxygen HL mode /** \code rest <a h*/ref="blubb"> of </a href='blubb'> end of doxygen HL mode /** \code rest <*/a href="blubb"> of </a href='blubb'> end of doxygen HL mode /** \code rest of line is normal comment HL * comment HL mode <html> text </html> */ end of doxygen HL mode <tag> <word> <normal comment HL> /** \file awo<html_should_be_ignored_here>rd rest of line is normal comment HL */ end of doxygen HL mode /** \file awo<html_should_be_ignored_here>*/rd end of doxygen HL mode /** \file awo<html_should_be_i*/gnored_here>rd end of doxygen HL mode /** \file awo<*/html_should_be_ignored_here>rd end of doxygen HL mode /** \file a*/wo<html_should_be_ignored_here>rd end of doxygen HL mode -/** \file aword rest of line is normal co<code>mment HL - * comment HL mode - */ end of doxygen HL mode +/** \file aword rest of line is normal co<code>mment HL + * comment HL mode + */ end of doxygen HL mode <tag> <rest of line is string> /** \brief A short <a href="blubb"> of </a href='blubb'> description */ end of doxygen HL mode /** \brief A short <a href="blubb"> of </a href='blubb'*/> end of doxygen HL mode /** \brief A short <a href="blubb"> of </a href='*/blubb'> end of doxygen HL mode /** \brief A short <a href="blubb"> of </a href=*/'blubb'> end of doxygen HL mode /** \brief A short <a href="blubb"> of </a href*/='blubb'> end of doxygen HL mode /** \brief A short <a href="blubb"> of </a */href='blubb'> end of doxygen HL mode /** \brief A short <a href="blubb"> of <*//a href='blubb'> end of doxygen HL mode /** \brief A short <a href="blubb"*/> of </a href='blubb'> end of doxygen HL mode /** \brief A short <a href="blubb*/"> of </a href='blubb'> end of doxygen HL mode /** \brief A short <a href="*/blubb"> of </a href='blubb'> end of doxygen HL mode /** \brief A short <a href=*/"blubb"> of </a href='blubb'> end of doxygen HL mode /** \brief A short <a href*/="blubb"> of </a href='blubb'> end of doxygen HL mode /** \brief A short <a h*/ref="blubb"> of </a href='blubb'> end of doxygen HL mode /** \brief A short <a href="blubb"> of </a href='blubb'> description * comment HL mode */ end of doxygen HL mode <tag> <word> <rest of line is string> /** \page aword A short <a href="blubb"> of </a href='blubb'> description */ end of doxygen HL mode /** \page aword A short <a href="blubb"> of </a href='blubb'*/> end of doxygen HL mode /** \page aword A short <a href="blubb"> of </a href='*/blubb'> end of doxygen HL mode /** \page aword A short <a href="blubb"> of </a href=*/'blubb'> end of doxygen HL mode /** \page aword A short <a href="blubb"> of </a href*/='blubb'> end of doxygen HL mode /** \page aword A short <a href="blubb"> of </a */href='blubb'> end of doxygen HL mode /** \page aword A short <a href="blubb"> of <*//a href='blubb'> end of doxygen HL mode /** \page aword A short <a href="blubb"*/> of </a href='blubb'> end of doxygen HL mode /** \page aword A short <a href="blubb*/"> of </a href='blubb'> end of doxygen HL mode /** \page aword A short <a href="*/blubb"> of </a href='blubb'> end of doxygen HL mode /** \page aword A short <a href=*/"blubb"> of </a href='blubb'> end of doxygen HL mode /** \page aword A short <a href*/="blubb"> of </a href='blubb'> end of doxygen HL mode /** \page aword A short <a h*/ref="blubb"> of </a href='blubb'> end of doxygen HL mode /** \page aword A short <*/a href="blubb"> of </a href='blubb'> end of doxygen HL mode /** \page aword A shor*/t <a href="blubb"> of </a href='blubb'> end of doxygen HL mode /** \page awor*/d A short <a href="blubb"> of </a href='blubb'> end of doxygen HL mode /** \page */aword A short <a href="blubb"> of </a href='blubb'> end of doxygen HL mode /** \page aword A short <a href="blubb"> of </a href='blubb'> description * comment HL mode */ end of doxygen HL mode <tag> <word> <word> <rest of line is string> /** \image aword aword rest of line is normal HL */ end of doxygen HL mode /** \image aword aword rest of line is*/ end of doxygen HL mode /** \image aword aword*/ end of doxygen HL mode /** \image aword aw*/ord end of doxygen HL mode /** \image aword */aword end of doxygen HL mode /** \image aword*/ end of doxygen HL mode /** \image awo*/rd end of doxygen HL mode /** \image */aword end of doxygen HL mode /** \ima*/ge end of doxygen HL mode /** \image aword aword rest of line is normal HL * comment HL mode */ end of doxygen HL mode Some further tests for singlelinecomments (* / should not pop!) =============================================================== /// a singlelinecommment blubb blubb */. stay in doxygen HL mode /// \code a singlelinecommment blubb b*/lubb. stay in doxygen HL mode /// \code*/ a singlelinecommment blubb blubb. stay in doxygen HL mode /// \code a singlelinecommment blubb blubb /// \brief a descriptive text (string) stay in doxygen HL mode /// \brief a descriptive text (string)*/ description should go on here /// \brief a descriptive text */(string) description should go on here /// \brief */a descriptive text (string) description should go on here /// \ref aword a descriptive text (string) */ description should go on here /// \ref aword a descriptive text (str*/ing) description should go on here /// \ref aword a des*/criptive text (string) description should go on here /// \ref aword*/ a descriptive text (string) description should go on here /// \ref aw*/ord a descriptive text (string) description should go on here /// \ref */aword a descriptive text (string) description should go on here HTML comment tests: =================== //! \ref word de<!--*/ -->scriptive text (string) normal HL mode. //! \ref w descriptive text (string) /** \ref word de<!--*/ -->scriptive text (string) normal HL mode. /** \ref w <!-- * HTML comments * --> * normal doxygen HL mode. */ And final tests for a word: a single char: =========================================== <tag> <word> <rest of line as string> //! \ref word descriptive text (string) //! \ref w descriptive text (string) <tag> <word> <word> <rest is normal HL> //! \image word1 word2 b descriptive text (string) //! \image a word b descriptive text (string) <tag> <rest of line is string> //! \brief A b c d e description should go on here <tag> <word> <rest of line is normal doxygen HL mode> //! \file word rest of line is normal comment HL //! \file a word rest of line is normal comment HL no doxygen HL mode here. == END OF TESTFILE ==diff --git a/autotests/html/test.c.html b/autotests/html/test.c.html index 1492d9b..06d8a22 100644 --- a/autotests/html/test.c.html +++ b/autotests/html/test.c.html @@ -1,63 +1,63 @@
#include <stdio.h> #include "stdint.h" #define SOME_VAR 1 #ifdef SOME_VAR #define MULTILINE_MACRO one \ two \ three static uint64_t intWithSuffix = 42ull; static int octNum = 07232; static int invalidOctNum = 09231; static uint64_t hexNum = 0xDEADBEEF42; static uint64_t invalidHexNum = 0xGLDFKG; static char binNum = 0b0101010; static double d1 = 42.; static double d2 = .42; static double d3 = 42.3e1; static double d4 = .2e-12; static double d5 = 32.e+12; static float floatQualifier = 23.123f; static const char c1 = 'c'; static const char c2 = '\n'; static const char c2a = '\120'; // octal static const char c2b = '\x1f'; // hex static const char c2c = '\''; static const char c2d = '\\'; static const char* c3 = "string"; static const char* c4 = "\"string\n\t\012\x12\""; static const char* c5 = "multiline \ string"; //BEGIN region // TODO comment FIXME comment ### comment //END region #wrong /** * Doxygen * @param p1 text - * \brief <b>bold text</b> + * \brief <b>bold text</b> * \dot * a -> b * \enddot * * \verbatim * <dummy> * \endverbatim - * <html>text</html> + * <html>text</html> */ #endifdiff --git a/autotests/reference/highlight.dox.ref b/autotests/reference/highlight.dox.ref index 6a5485e..2af9395 100644 --- a/autotests/reference/highlight.dox.ref +++ b/autotests/reference/highlight.dox.ref @@ -1,227 +1,227 @@
rest of line is normal comment HL
rest of line is normal comment HL
comment HL mode
rest of line is normal comment HL
rest of */ > end of doxygen HL mode
/** \code rest of */ '> end of doxygen HL mode
/** \code rest of */ blubb'> end of doxygen HL mode
/** \code rest of */ 'blubb'> end of doxygen HL mode
/** \code rest of end of doxygen HL mode
rest */ "blubb"> of end of doxygen HL mode
rest */ ref="blubb"> of end of doxygen HL mode
rest <
rest of line is normal comment HL
comment HL mode text
mment HL
- * comment HL mode
- */ end of doxygen HL mode
+/** \file aword rest of line is normal co mment HL
+ * comment HL mode
+ */ end of doxygen HL mode
/** \brief A short href= "blubb" > of href= 'blubb' > description */ end of doxygen HL mode
/** \brief A short href= "blubb" > of href= 'blubb' */ > end of doxygen HL mode
/** \brief A short href= "blubb" > of href= ' */ blubb'> end of doxygen HL mode
/** \brief A short href= "blubb" > of href= */ 'blubb'> end of doxygen HL mode
/** \brief A short href= "blubb" > of href */ ='blubb'> end of doxygen HL mode
/** \brief A short href= "blubb" > of */ href='blubb'> end of doxygen HL mode
/** \brief A short href= "blubb" > of <*/ /a href='blubb'> end of doxygen HL mode
/** \brief A short href= "blubb" */ > of end of doxygen HL mode
a singlelinecommment blubb b
a singlelinecommment blubb blubb
\brief a descriptive text (string) stay in doxygen HL mode
\brief a descriptive text (string)